mirror of
https://git.sr.ht/~joren/streamrip-go
synced 2026-07-27 23:42:28 +02:00
feat: add beatport provider
This commit is contained in:
@@ -21,6 +21,7 @@ type Metadata struct {
|
||||
DiscTotal int
|
||||
Date string
|
||||
Genre string
|
||||
InitialKey string
|
||||
Comment string
|
||||
Description string
|
||||
Lyrics string
|
||||
@@ -160,6 +161,7 @@ func toTags(meta Metadata) map[string]string {
|
||||
"album_artist": meta.AlbumArtist,
|
||||
"date": meta.Date,
|
||||
"genre": meta.Genre,
|
||||
"INITIALKEY": meta.InitialKey,
|
||||
"comment": meta.Comment,
|
||||
"description": meta.Description,
|
||||
"lyrics": meta.Lyrics,
|
||||
|
||||
@@ -30,6 +30,7 @@ func TestToTagsTotalsAndSourceFields(t *testing.T) {
|
||||
DiscNumber: 1,
|
||||
DiscTotal: 2,
|
||||
ISRC: "USABC1234567",
|
||||
InitialKey: "Em",
|
||||
ReplaygainTrackGain: "-7.25 dB",
|
||||
ReplaygainAlbumGain: "-8.1 dB",
|
||||
ReplaygainTrackPeak: "0.989",
|
||||
@@ -49,6 +50,9 @@ func TestToTagsTotalsAndSourceFields(t *testing.T) {
|
||||
if tags["isrc"] != "USABC1234567" {
|
||||
t.Fatalf("isrc missing: %+v", tags)
|
||||
}
|
||||
if tags["INITIALKEY"] != "Em" {
|
||||
t.Fatalf("INITIALKEY missing: %+v", tags)
|
||||
}
|
||||
if tags["source_platform"] != "QOBUZ" || tags["source_track_id"] != "t1" {
|
||||
t.Fatalf("source tags missing: %+v", tags)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user