Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| cf5a38a376 |
@@ -87,6 +87,13 @@ pub async fn get_by_artist(db: &DatabaseConnection, artist_id: i32) -> DbResult<
|
|||||||
.await?)
|
.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,
|
/// Get tracks that need metadata enrichment — either no MBID at all,
|
||||||
/// or have an MBID but are missing album info (e.g., freshly downloaded).
|
/// or have an MBID but are missing album info (e.g., freshly downloaded).
|
||||||
pub async fn get_needing_metadata(db: &DatabaseConnection) -> DbResult<Vec<Track>> {
|
pub async fn get_needing_metadata(db: &DatabaseConnection) -> DbResult<Vec<Track>> {
|
||||||
|
|||||||
Reference in New Issue
Block a user