Attempt to fix playlist gen dropdown

This commit is contained in:
Connor Johnstone
2026-03-26 13:20:20 -04:00
parent e4947191d0
commit cf5a38a376
+7
View File
@@ -87,6 +87,13 @@ pub async fn get_by_artist(db: &DatabaseConnection, artist_id: i32) -> DbResult<
.await?)
}
pub async fn count_by_artist(db: &DatabaseConnection, artist_id: i32) -> DbResult<u64> {
Ok(Tracks::find()
.filter(track::Column::ArtistId.eq(artist_id))
.count(db)
.await?)
}
/// Get tracks that need metadata enrichment — either no MBID at all,
/// or have an MBID but are missing album info (e.g., freshly downloaded).
pub async fn get_needing_metadata(db: &DatabaseConnection) -> DbResult<Vec<Track>> {