Fix Recursive searching with tags including Any and All filter modes

This commit is contained in:
Cameron Cordes
2024-03-09 13:11:55 -05:00
parent b2c8ebe558
commit 05a56ba0bd
5 changed files with 63 additions and 31 deletions

View File

@@ -31,12 +31,14 @@ use diesel::sqlite::Sqlite;
use notify::{Config, EventKind, RecommendedWatcher, RecursiveMode, Watcher};
use rayon::prelude::*;
use log::{debug, error, info, warn};
use log::{debug, error, info, trace, warn};
use crate::auth::login;
use crate::data::*;
use crate::database::*;
use crate::files::{is_image_or_video, is_valid_full_path, move_file, RealFileSystem, RefreshThumbnailsMessage};
use crate::files::{
is_image_or_video, is_valid_full_path, move_file, RealFileSystem, RefreshThumbnailsMessage,
};
use crate::service::ServiceBuilder;
use crate::state::AppState;
use crate::tags::*;
@@ -86,7 +88,7 @@ async fn get_image(
let thumbs = &app_state.thumbnail_path;
let thumb_path = Path::new(&thumbs).join(relative_path);
debug!("{:?}", thumb_path);
trace!("Thumbnail path: {:?}", thumb_path);
if let Ok(file) = NamedFile::open(&thumb_path) {
file.into_response(&request)
} else {
@@ -195,7 +197,7 @@ async fn upload_image(
}
app_state.stream_manager.do_send(RefreshThumbnailsMessage);
HttpResponse::Ok().finish()
}