From 2ad4c03c0374a8e5c396210c41e27cb57af36f44 Mon Sep 17 00:00:00 2001 From: zhaarey <157944548+zhaarey@users.noreply.github.com> Date: Wed, 12 Jun 2024 22:08:40 +0800 Subject: [PATCH] fix DiscNumber error --- main_atmos.go | 4 ++-- main_select.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/main_atmos.go b/main_atmos.go index e6bd3c0..6c347e0 100644 --- a/main_atmos.go +++ b/main_atmos.go @@ -1353,8 +1353,8 @@ func rip(albumId string, token string, storefront string, userToken string) erro "{SongId}", track.ID, "{SongNumer}", fmt.Sprintf("%02d", trackNum), "{SongName}", track.Attributes.Name, - "{DiscNumber}", string(track.Attributes.DiscNumber), - "{TrackNumber}", fmt.Sprintf("%02d", track.Attributes.TrackNumber), + "{DiscNumber}", fmt.Sprintf("%0d", track.Attributes.DiscNumber), + "{TrackNumber}", fmt.Sprintf("%0d", track.Attributes.TrackNumber), "{Quality}", Quality, "{Codec}", "Atmos", "{Tag}", Tag_string, diff --git a/main_select.go b/main_select.go index 5dcbc3e..e1b3be1 100644 --- a/main_select.go +++ b/main_select.go @@ -1362,8 +1362,8 @@ func rip(albumId string, token string, storefront string, userToken string) erro "{SongId}", track.ID, "{SongNumer}", fmt.Sprintf("%02d", trackNum), "{SongName}", track.Attributes.Name, - "{DiscNumber}", string(track.Attributes.DiscNumber), - "{TrackNumber}", fmt.Sprintf("%02d", track.Attributes.TrackNumber), + "{DiscNumber}", fmt.Sprintf("%0d", track.Attributes.DiscNumber), + "{TrackNumber}", fmt.Sprintf("%0d", track.Attributes.TrackNumber), "{Quality}", Quality, "{Codec}", "ALAC", "{Tag}", Tag_string,