[easytag] Fix stripping disc number field from ID3v2.4 tags



commit 551629c3f63c071122a5fadb012f8ce37821111e
Author: David King <amigadave amigadave com>
Date:   Mon Dec 29 11:43:02 2014 +0000

    Fix stripping disc number field from ID3v2.4 tags
    
    As part of a change made in bug 726467, disc number handling for ID3
    tags was modified to only allow digits and the '/' character in the TPOS
    field. A bogus check was added for ID3 tags, so that if saving a tag
    with no content in the disc number field, the existing TPOS tag would
    not be cleared.
    
    Remove the erroneous check, as et_id3tag_get_tpos_from_file_tag() safely
    handles the disc number field being empty.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=742082

 src/tags/id3v24_tag.c |   11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)
---
diff --git a/src/tags/id3v24_tag.c b/src/tags/id3v24_tag.c
index 4a42dda..1a0679f 100644
--- a/src/tags/id3v24_tag.c
+++ b/src/tags/id3v24_tag.c
@@ -1053,13 +1053,10 @@ id3tag_write_file_v24tag (const ET_File *ETFile,
     /***************
      * Part of set *
      ***************/
-    if (FileTag->disc_number)
-    {
-        string1 = et_id3tag_get_tpos_from_file_tag (FileTag);
-        etag_set_tags (string1, "TPOS", ID3_FIELD_TYPE_STRINGLIST, NULL, v2tag,
-                       &strip_tags);
-        g_free (string1);
-    }
+    string1 = et_id3tag_get_tpos_from_file_tag (FileTag);
+    etag_set_tags (string1, "TPOS", ID3_FIELD_TYPE_STRINGLIST, NULL, v2tag,
+                   &strip_tags);
+    g_free (string1);
 
     /********
      * Year *


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]