From 5de0bc92e28840a39e85fba741d4b9a93e7e820e Mon Sep 17 00:00:00 2001 From: Matthias Saou Date: Feb 19 2007 10:53:50 +0000 Subject: Include patch to remove APE tags when tagging MP3 files (#200507). --- diff --git a/easytag-1.99.13-noape.patch b/easytag-1.99.13-noape.patch new file mode 100644 index 0000000..d575ead --- /dev/null +++ b/easytag-1.99.13-noape.patch @@ -0,0 +1,69 @@ +diff -ruN easytag-1.99.13.orig/src/id3_tag.c easytag-1.99.13/src/id3_tag.c +--- easytag-1.99.13.orig/src/id3_tag.c 2006-12-06 22:08:38.000000000 +0100 ++++ easytag-1.99.13/src/id3_tag.c 2007-02-17 00:50:37.603618408 +0100 +@@ -30,6 +30,7 @@ + + #include "id3_tag.h" + #include "id3lib/id3_bugfix.h" ++#include "ape_tag.h" + #include "picture.h" + #include "easytag.h" + #include "browser.h" +@@ -493,6 +494,7 @@ + { + File_Tag *FileTag; + gchar *filename; ++ gchar *filename_utf8; + gchar *basename_utf8; + gchar *temp; + FILE *file; +@@ -542,13 +544,12 @@ + + FileTag = (File_Tag *)ETFile->FileTag->data; + filename = ((File_Name *)ETFile->FileNameCur->data)->value; ++ filename_utf8 = filename_to_display(filename); + + /* Test to know if we can write into the file */ + if ( (file=fopen(filename,"r+"))==NULL ) + { +- gchar *filename_utf8 = filename_to_display(filename); + g_print(_("ERROR while opening file: '%s' (%s).\n\a"),filename_utf8,g_strerror(errno)); +- g_free(filename_utf8); + return FALSE; + } + fclose(file); +@@ -847,6 +848,26 @@ + } + + ++ /****************************** ++ * Delete an APE tag if found * ++ ******************************/ ++ { ++ // Delete the APE tag (create a dummy ETFile for the Ape_Tag_... function) ++ ET_File *ETFile_tmp = ET_File_Item_New(); ++ File_Name *FileName_tmp = ET_File_Name_Item_New(); ++ File_Tag *FileTag_tmp = ET_File_Tag_Item_New(); ++ // Same file... ++ FileName_tmp->value = g_strdup(filename_utf8); ++ ETFile_tmp->FileNameList = g_list_append(NULL,FileName_tmp); ++ ETFile_tmp->FileNameCur = ETFile_tmp->FileNameList; ++ // With empty tag... ++ ETFile_tmp->FileTagList = g_list_append(NULL,FileTag_tmp); ++ ETFile_tmp->FileTag = ETFile_tmp->FileTagList; ++ Ape_Tag_Write_File_Tag(ETFile_tmp); ++ ET_Free_File_List_Item(ETFile_tmp); ++ } ++ ++ + /********************************* + * Update id3v1.x and id3v2 tags * + *********************************/ +@@ -986,6 +1007,7 @@ + /* Free allocated data */ + ID3Tag_Delete(id3_tag); + g_free(basename_utf8); ++ g_free(filename_utf8); + + if (error) return FALSE; + else return TRUE; diff --git a/easytag.spec b/easytag.spec index 4591e4b..0a6bea4 100644 --- a/easytag.spec +++ b/easytag.spec @@ -1,7 +1,7 @@ Summary: Tag editor for mp3, ogg, flac and other music files Name: easytag Version: 1.99.13 -Release: 2%{?dist} +Release: 3%{?dist} License: GPL Group: Applications/Multimedia URL: http://easytag.sourceforge.net/ @@ -12,6 +12,7 @@ URL: http://easytag.sourceforge.net/ # tar --numeric-owner -cjvf easytag-$VERSION-patched.tar.bz2 easytag-$VERSION Source: easytag-%{version}-patched.tar.bz2 Patch0: easytag-1.99.13-id3lib.patch +Patch1: easytag-1.99.13-noape.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: gtk2-devel >= 2.4.0, id3lib-devel >= 3.7.12 BuildRequires: libvorbis-devel >= 1.0, flac-devel, libmp4v2-devel, gettext @@ -23,7 +24,8 @@ MP2, FLAC, Ogg Vorbis, MusePack and Monkey's Audio files. %prep %setup -%patch -p1 -b .id3lib +%patch0 -p1 -b .id3lib +%patch1 -p1 -b .noape %build @@ -52,6 +54,9 @@ MP2, FLAC, Ogg Vorbis, MusePack and Monkey's Audio files. %changelog +* Mon Feb 19 2007 Matthias Saou 1.99.13-3 +- Include patch to remove APE tags when tagging MP3 files (#200507). + * Thu Feb 15 2007 Matthias Saou 1.99.13-2 - Rebuild against flac 1.1.4. - Enable libmp4v2 since it's now part of Fedora.