From 3a6e98080c843c6e77c61adf83315940b327cb17 Mon Sep 17 00:00:00 2001 From: lrisora <43085437+lrisora@users.noreply.github.com> Date: Sun, 5 Nov 2023 09:07:45 +0800 Subject: [PATCH] fix #631: Correct the issue where 'ALBUMARTIST' and 'DISCNUMBER' (if present) are duplicated every time tags are saved. --- MusicPlayer2/TagLibHelper.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MusicPlayer2/TagLibHelper.cpp b/MusicPlayer2/TagLibHelper.cpp index 581c4ac9f..a698b7448 100644 --- a/MusicPlayer2/TagLibHelper.cpp +++ b/MusicPlayer2/TagLibHelper.cpp @@ -386,6 +386,8 @@ template static void WriteOtherProperties(const SongInfo& song_info, T& file) { TagLib::PropertyMap properties = file.properties(); + properties["ALBUMARTIST"].clear(); + properties["DISCNUMBER"].clear(); if (!song_info.album_artist.empty()) properties["ALBUMARTIST"].append(song_info.album_artist); if (song_info.disc_num != 0)