Attempt to fix playlist gen dropdown
This commit is contained in:
@@ -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,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user