mirror of
https://git.sr.ht/~joren/streamrip-go
synced 2026-07-27 23:42:28 +02:00
fix: set album track totals
This commit is contained in:
@@ -490,6 +490,22 @@ func TestBuildTagMetadataUsesAlbumArtistOverride(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestBuildTagMetadataUsesAlbumContextTrackTotal(t *testing.T) {
|
||||
meta := map[string]any{
|
||||
"title": "ideal world (feat. higma)",
|
||||
"track_number": float64(2),
|
||||
"performer": map[string]any{"name": "Seren Azuma"},
|
||||
"album": map[string]any{
|
||||
"title": "YUKIHASU",
|
||||
"artist": map[string]any{"name": "Seren Azuma"},
|
||||
},
|
||||
}
|
||||
tags := buildTagMetadata(meta, "ideal world (feat. higma)", "qobuz", "295525879", ripTrackOptions{total: 11})
|
||||
if tags.TrackTotal != 11 {
|
||||
t.Fatalf("track total = %d, want 11", tags.TrackTotal)
|
||||
}
|
||||
}
|
||||
|
||||
func TestBuildTagMetadataPlaylistOmitsDiscTags(t *testing.T) {
|
||||
meta := map[string]any{
|
||||
"title": "One Step Too Far",
|
||||
|
||||
Reference in New Issue
Block a user