[Easytag-mailing] Patch for EasyTAG 0.26 ( 0.26a -> 0.26b )
- From: Jérôme Couderc <j couderc ifrance com>
- To: easytag-mailing lists sourceforge net
- Subject: [Easytag-mailing] Patch for EasyTAG 0.26 ( 0.26a -> 0.26b )
- Date: Sat Jan 18 10:11:05 2003
Hi,
Here is a patch to fix a problem with too long track name of cddb
albums. Also, detection of libFLAC was corrected to avoid problem with
some platforms.
Jerome
--
EasyTAG - Tag editor for MP3 and OGG files
http://easytag.sourceforge.net
--
Jerome COUDERC <j couderc ifrance com>
diff -ruN easytag-0.26a/configure easytag-0.26b/configure
--- easytag-0.26a/configure Sat Jan 18 18:37:47 2003
+++ easytag-0.26b/configure Sat Jan 18 18:48:38 2003
@@ -1373,7 +1373,7 @@
PACKAGE=easytag
-VERSION=0.26a
+VERSION=0.26b
ALL_LINGUAS="cs de es fr hu it ja nl pl ro ru sv uk"
@@ -8150,7 +8150,7 @@
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- . conftest.flac; echo "${LIBFLAC_MAJOR}.${LIBFLAC_MINOR}.${LIBFLAC_PATCH}"
+ . ./conftest.flac; echo "${LIBFLAC_MAJOR}.${LIBFLAC_MINOR}.${LIBFLAC_PATCH}"
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
diff -ruN easytag-0.26a/configure.in easytag-0.26b/configure.in
--- easytag-0.26a/configure.in Sat Jan 18 18:37:47 2003
+++ easytag-0.26b/configure.in Sat Jan 18 18:38:48 2003
@@ -3,7 +3,7 @@
dnl from gettext
PACKAGE=easytag
-VERSION=0.26a
+VERSION=0.26b
dnl -------------------------------
dnl Translation files
@@ -111,7 +111,7 @@
fclose(output);
exit(0);
}
-], . conftest.flac; echo "${LIBFLAC_MAJOR}.${LIBFLAC_MINOR}.${LIBFLAC_PATCH}", AC_MSG_WARN(could not determine libFLAC version),[echo $ac_n "cross compiling; assuming ${LIBFLAC_MAJOR}.${LIBFLAC_MINOR}.${LIBFLAC_PATCH} $ac_c"])
+], . ./conftest.flac; echo "${LIBFLAC_MAJOR}.${LIBFLAC_MINOR}.${LIBFLAC_PATCH}", AC_MSG_WARN(could not determine libFLAC version),[echo $ac_n "cross compiling; assuming ${LIBFLAC_MAJOR}.${LIBFLAC_MINOR}.${LIBFLAC_PATCH} $ac_c"])
LIBS="$LIBS_SAVE"
CFLAGS="$CFLAGS_SAVE"
fi
diff -ruN easytag-0.26a/easytag.spec easytag-0.26b/easytag.spec
--- easytag-0.26a/easytag.spec Sat Jan 18 18:37:47 2003
+++ easytag-0.26b/easytag.spec Sat Jan 18 18:49:24 2003
@@ -1,5 +1,5 @@
%define name easytag
-%define version 0.26a
+%define version 0.26b
%define release 1
%define prefix /usr
diff -ruN easytag-0.26a/src/cddb.c easytag-0.26b/src/cddb.c
--- easytag-0.26a/src/cddb.c Sun Dec 22 14:06:51 2002
+++ easytag-0.26b/src/cddb.c Sat Jan 18 18:46:48 2003
@@ -1508,17 +1508,38 @@
}else if ( strncmp(cddb_out,"TTITLE",6)==0 ) // Track title
{
+ CddbTrackAlbum *cddbtrackalbum_last = NULL;
+
CddbTrackAlbum *cddbtrackalbum = g_malloc0(sizeof(CddbTrackAlbum));
- cddbtrackalbum->cddbalbum = cddbalbum; // To find the father
+ cddbtrackalbum->cddbalbum = cddbalbum; // To find the CddbAlbum father quickly
cddbtrackalbum->track_name = g_strdup(strchr(cddb_out,'=')+1);
*strchr(cddb_out,'=') = 0;
cddbtrackalbum->track_number = atoi(cddb_out+6)+1;
- if (TrackOffsetList && TrackOffsetList->next)
+
+ // Note : titles too long take severals lines. For example :
+ // TTITLE15=Bob Marley vs. Funkstar De Luxe Remix - Sun Is Shining (Radio De Lu
+ // TTITLE15=xe Edit)
+ // So to check it, we compare current track number with the previous one...
+ if (cddbalbum->track_list)
+ cddbtrackalbum_last = g_list_last(cddbalbum->track_list)->data;
+ if (cddbtrackalbum_last && cddbtrackalbum_last->track_number == cddbtrackalbum->track_number)
+ {
+ gchar *track_name = g_strconcat(cddbtrackalbum_last->track_name,cddbtrackalbum->track_name,NULL);
+ g_free(cddbtrackalbum_last->track_name);
+ cddbtrackalbum_last->track_name = track_name;
+
+ // Frees useless allocated data previously
+ g_free(cddbtrackalbum->track_name);
+ g_free(cddbtrackalbum);
+ }else
{
- cddbtrackalbum->duration = ( ((CddbTrackFrameOffset *)TrackOffsetList->next->data)->offset - ((CddbTrackFrameOffset *)TrackOffsetList->data)->offset ) / 75; // Calculate time in seconds
- TrackOffsetList = TrackOffsetList->next;
+ if (TrackOffsetList && TrackOffsetList->next)
+ {
+ cddbtrackalbum->duration = ( ((CddbTrackFrameOffset *)TrackOffsetList->next->data)->offset - ((CddbTrackFrameOffset *)TrackOffsetList->data)->offset ) / 75; // Calculate time in seconds
+ TrackOffsetList = TrackOffsetList->next;
+ }
+ cddbalbum->track_list = g_list_append(cddbalbum->track_list,cddbtrackalbum);
}
- cddbalbum->track_list = g_list_append(cddbalbum->track_list,cddbtrackalbum);
}else if ( strncmp(cddb_out,"EXTD=",5)==0 ) // Extended album data
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]