Attempt to fix playlist gen dropdown

This commit is contained in:
Connor Johnstone
2026-03-26 13:20:20 -04:00
parent 4ccc6bcf27
commit 5786cc89e5
4 changed files with 23 additions and 6 deletions
+6
View File
@@ -38,6 +38,7 @@ struct ArtistListItem {
total_watched: usize,
total_owned: usize,
total_items: usize,
local_tracks: u64,
}
#[derive(Serialize, Deserialize, Clone)]
@@ -131,6 +132,10 @@ async fn list_artists(
.collect::<std::collections::HashSet<_>>()
.len();
let local_tracks = queries::tracks::count_by_artist(state.db.conn(), a.id)
.await
.unwrap_or(0);
items.push(ArtistListItem {
id: a.id,
name: a.name.clone(),
@@ -140,6 +145,7 @@ async fn list_artists(
total_watched,
total_owned,
total_items,
local_tracks,
});
}