mirror of
https://git.sr.ht/~joren/streamrip-go
synced 2026-10-16 22:07:30 +02:00
map deezer gain to replaygain track metadata
This commit is contained in:
1 parent
4f86751ff4
commit
1246a24749
2 files changed
+16
No files matched your search
@@ -621,3 +621,16 @@ func TestBuildTagMetadataReplayGainFallbacks(t *testing.T) {
|
||||
t.Fatalf("album replaygain peak=%q", tags.ReplaygainAlbumPeak)
|
||||
}
|
||||
}
|
||||
|
||||
func TestBuildTagMetadataReplayGainFallsBackToDeezerGain(t *testing.T) {
|
||||
meta := map[string]any{
|
||||
"gain": float64(-10),
|
||||
"performer": map[string]any{"name": "Artist"},
|
||||
"album": map[string]any{"title": "Album"},
|
||||
}
|
||||
|
||||
tags := buildTagMetadata(meta, "Song", "deezer", "2675762392", ripTrackOptions{})
|
||||
if tags.ReplaygainTrackGain != "-10 dB" {
|
||||
t.Fatalf("track replaygain gain=%q", tags.ReplaygainTrackGain)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user