Fixes for track management

This commit is contained in:
Connor Johnstone
2026-03-18 13:44:08 -04:00
parent 0572722184
commit 966dc6ca86
3 changed files with 86 additions and 1 deletions

View File

@@ -104,6 +104,24 @@ pub trait MetadataProvider: Send + Sync {
&self,
release_mbid: &str,
) -> impl std::future::Future<Output = TagResult<Vec<ReleaseTrack>>> + Send;
/// Get deduplicated release groups (albums, EPs, singles) for an artist.
fn get_artist_release_groups(
&self,
artist_mbid: &str,
) -> impl std::future::Future<Output = TagResult<Vec<ReleaseGroupEntry>>> + Send;
}
/// A release group (deduplicated album/EP/single concept).
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ReleaseGroupEntry {
pub mbid: String,
pub title: String,
pub primary_type: Option<String>,
pub secondary_types: Vec<String>,
pub first_release_date: Option<String>,
/// MBID of the first release in this group (for fetching tracks).
pub first_release_mbid: Option<String>,
}
/// A track within a release.