mirror of
https://github.com/zhaarey/apple-music-downloader.git
synced 2025-10-23 15:11:05 +00:00
Update main.go
This commit is contained in:
8
main.go
8
main.go
@@ -1012,7 +1012,6 @@ func writeMP4Tags(trackPath string, meta *structs.AutoGenerated, trackNum, track
|
|||||||
Artist: meta.Data[0].Relationships.Tracks.Data[index].Attributes.ArtistName,
|
Artist: meta.Data[0].Relationships.Tracks.Data[index].Attributes.ArtistName,
|
||||||
ArtistSort: meta.Data[0].Relationships.Tracks.Data[index].Attributes.ArtistName,
|
ArtistSort: meta.Data[0].Relationships.Tracks.Data[index].Attributes.ArtistName,
|
||||||
Custom: map[string]string{
|
Custom: map[string]string{
|
||||||
"DATE": meta.Data[0].Attributes.ReleaseDate,
|
|
||||||
"PERFORMER": meta.Data[0].Relationships.Tracks.Data[index].Attributes.ArtistName,
|
"PERFORMER": meta.Data[0].Relationships.Tracks.Data[index].Attributes.ArtistName,
|
||||||
"RELEASETIME": meta.Data[0].Relationships.Tracks.Data[index].Attributes.ReleaseDate,
|
"RELEASETIME": meta.Data[0].Relationships.Tracks.Data[index].Attributes.ReleaseDate,
|
||||||
"ISRC": meta.Data[0].Relationships.Tracks.Data[index].Attributes.Isrc,
|
"ISRC": meta.Data[0].Relationships.Tracks.Data[index].Attributes.Isrc,
|
||||||
@@ -1773,7 +1772,12 @@ func extractMediaQuality(b string) (string, error) {
|
|||||||
if len(split) >= 3 {
|
if len(split) >= 3 {
|
||||||
bitDepth := split[len(split)-1]
|
bitDepth := split[len(split)-1]
|
||||||
sampleRate := split[len(split)-2]
|
sampleRate := split[len(split)-2]
|
||||||
Quality = fmt.Sprintf("%s-bit / %s Hz", bitDepth, sampleRate)
|
HZ, err := strconv.Atoi(sampleRate)
|
||||||
|
if err != nil {
|
||||||
|
fmt.Println(err)
|
||||||
|
}
|
||||||
|
KHZ := float64(HZ) / 1000.0
|
||||||
|
Quality = fmt.Sprintf("%sB-%skHz", bitDepth, KHZ)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user