diff --git a/src/route/admin.rs b/src/route/admin.rs index 50d108a..f2dc35f 100644 --- a/src/route/admin.rs +++ b/src/route/admin.rs @@ -21,9 +21,12 @@ pub async fn clean_library(lib: &State, u: User) -> FallibleApiResponse #[get("/library/singles")] pub async fn get_singles_route(u: User) -> FallibleApiResponse { check_admin!(u); - let singles = Track::find(doc! { "album_id": None::}, None) - .await - .unwrap(); + let singles = Track::find( + doc! { "album_id": None::, "artist_id": {"$ne": None:: }}, + None, + ) + .await + .unwrap(); Ok(json!(to_api(&singles).await)) }