diff --git a/main.go b/main.go index f899cab..2ed6234 100644 --- a/main.go +++ b/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, ArtistSort: meta.Data[0].Relationships.Tracks.Data[index].Attributes.ArtistName, Custom: map[string]string{ - "DATE": meta.Data[0].Attributes.ReleaseDate, "PERFORMER": meta.Data[0].Relationships.Tracks.Data[index].Attributes.ArtistName, "RELEASETIME": meta.Data[0].Relationships.Tracks.Data[index].Attributes.ReleaseDate, "ISRC": meta.Data[0].Relationships.Tracks.Data[index].Attributes.Isrc, @@ -1773,7 +1772,12 @@ func extractMediaQuality(b string) (string, error) { if len(split) >= 3 { bitDepth := split[len(split)-1] 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 } }