Fix searching by tags and fixed All FilterMode

Manually parsing the tag_ids for the file filtering isn't amazing, but
this works in a more friendly format.

Also the All filter mode was set up in the wrong direction instead of
checking that the file had ALL the tag ids provided, it checked that all
the tag-ids were on a file, which is too restrictive and wouldn't show
many files. Perhaps an ONLY option could exist for being even more
specific.
This commit is contained in:
Cameron Cordes
2023-03-22 13:55:10 -04:00
parent 02444de7fa
commit 5a2dce85e8
2 changed files with 13 additions and 5 deletions

View File

@@ -103,7 +103,7 @@ pub struct PhotosResponse {
#[derive(Deserialize)]
pub struct FilesRequest {
pub path: String,
pub tag_ids: Option<Vec<i32>>,
pub tag_ids: Option<String>, // comma separated numbers
pub tag_filter_mode: Option<FilterMode>,
}