Fixes for track management
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user