Hello community,
here is the log from the commit of package python-eyeD3 for openSUSE:Factory
checked in at Fri Aug 7 16:51:06 CEST 2009.
--------
--- python-eyeD3/python-eyeD3.changes 2008-09-12 14:18:48.000000000 +0200
+++ python-eyeD3/python-eyeD3.changes 2009-08-05 18:16:29.000000000 +0200
@@ -1,0 +2,7 @@
+Wed Aug 5 18:15:30 CEST 2009 - matejcik@suse.cz
+
+- update to 0.6.17
+ * minor bugfixes
+ * proper exit code for eyed3 cmdline tool
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
eyeD3-0.6.16.tar.bz2
New:
----
eyeD3-0.6.17.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-eyeD3.spec ++++++
--- /var/tmp/diff_new_pack.lk3c40/_old 2009-08-07 16:48:25.000000000 +0200
+++ /var/tmp/diff_new_pack.lk3c40/_new 2009-08-07 16:48:25.000000000 +0200
@@ -1,7 +1,7 @@
#
-# spec file for package python-eyeD3 (Version 0.6.16)
+# spec file for package python-eyeD3 (Version 0.6.17)
#
-# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -21,7 +21,7 @@
Name: python-eyeD3
BuildRequires: python-devel
Summary: Python Module for ID3 Tag Manipulation
-Version: 0.6.16
+Version: 0.6.17
Release: 1
Source0: eyeD3-%{version}.tar.bz2
License: GPL v2 or later
++++++ eyeD3-0.6.16.tar.bz2 -> eyeD3-0.6.17.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/eyeD3-0.6.16/ChangeLog new/eyeD3-0.6.17/ChangeLog
--- old/eyeD3-0.6.16/ChangeLog 2008-06-08 20:24:54.000000000 +0200
+++ new/eyeD3-0.6.17/ChangeLog 2009-02-02 04:54:52.000000000 +0100
@@ -1,3 +1,62 @@
+2009-02-02 03:54 'Travis Shirk '
+
+ * [r969] NEWS: Relese updates.
+
+2009-02-02 02:46 'Travis Shirk '
+
+ * [r968] etc/gentoo/eyeD3-0.6.17.ebuild: Added
+
+2009-02-02 02:44 'Travis Shirk '
+
+ * [r967] src/eyeD3/frames.py: unicode wrapper to support bad
+ unicode workarounds
+
+2009-02-02 02:43 'Travis Shirk '
+
+ * [r966] src/eyeD3/tag.py: Allow '.' in genres
+
+2009-01-26 02:03 'Travis Shirk '
+
+ * [r962] bin/eyeD3, doc/eyeD3.1.in, src/eyeD3/frames.py,
+ src/eyeD3/tag.py: Support for URL frames (W***) and WXXX.
+
+2009-01-22 06:18 'Travis Shirk '
+
+ * [r961] src/eyeD3/frames.py: fix for more invalid utf16
+
+2008-10-18 21:10 'Travis Shirk '
+
+ * [r952] bin/eyeD3: Fixed NFO output bug.. losing one track per
+ album.
+
+2008-10-17 00:10 'Travis Shirk '
+
+ * [r948] acsite.m4, configure.in: Version bumped to 0.6.17 and
+ better autoconf python checker
+
+2008-10-12 23:57 'Travis Shirk '
+
+ * [r947] src/eyeD3/tag.py: Allow ' in genres, for example, Drun
+ 'n' Bass
+
+2008-10-12 23:41 'Travis Shirk '
+
+ * [r946] src/eyeD3/frames.py: Handle PLCT frames with less than 4
+ bytes of data whick is technically BAD TAG.
+
+2008-10-12 23:28 'Travis Shirk '
+
+ * [r945] bin/eyeD3: Bug fix to show ALL genres with --list-genres
+
+2008-10-12 23:03 'Travis Shirk '
+
+ * [r944] bin/eyeD3: non-zero exit status for exceptions.
+
+2008-06-08 18:24 'Travis Shirk '
+
+ * [r938] ChangeLog, NEWS, etc/gentoo/eyeD3-0.6.16.ebuild: Release
+ 0.6.16 updates
+
2008-06-08 17:32 'Travis Shirk '
* [r937] src/eyeD3/tag.py: Added removeUserTextFrame -- Patch by
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/eyeD3-0.6.16/NEWS new/eyeD3-0.6.17/NEWS
--- old/eyeD3-0.6.16/NEWS 2008-06-08 20:24:54.000000000 +0200
+++ new/eyeD3-0.6.17/NEWS 2009-02-02 04:54:52.000000000 +0100
@@ -1,5 +1,15 @@
Release Notes:
===============
+eyeD3 0.6.16 - 02.01.2009 (The Point of No Return)
+ Bug fixes:
+ * Workaround invalid utf16
+ * Show all genres during --list-genres
+ * Workaround invalid PLCT frames.
+ * Show all tracks during --nfo output.
+ New features:
+ * Support for URL frames (W??? and WXXX)
+ * Program exit code for the 'eyeD3' command line tool
+
eyeD3 0.6.16 - 06.09.2008 (Gimme Danger)
Bug fixes:
* Typo fix of sysnc/unsync data. Thanks to Gergan Penkov
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/eyeD3-0.6.16/README new/eyeD3-0.6.17/README
--- old/eyeD3-0.6.16/README 2008-06-08 20:24:54.000000000 +0200
+++ new/eyeD3-0.6.17/README 2009-02-02 04:54:52.000000000 +0100
@@ -1,6 +1,6 @@
-eyeD3 0.6.16
+eyeD3 0.6.17
Travis Shirk
-06.08.2008
+02.01.2009
General Information
@@ -12,7 +12,7 @@
v1.0/v1.1 (http://id3lib.sourceforge.net/id3/id3v1.html)
and v2.3/v2.4 (http://id3lib.sourceforge.net/id3/develop.html).
-The current stable version is 0.6.16. It and earlier versions are
+The current stable version is 0.6.17. It and earlier versions are
available here (http://eyed3.nicfit.net/releases/).
See the NEWS (NEWS) and/or ChangeLog (ChangeLog) for changes.
@@ -27,8 +27,8 @@
Source tarball
--------------
- gzip -dc eyeD3-0.6.16.tar.gz | tar xvf -
- cd eyeD3-0.6.16
+ gzip -dc eyeD3-0.6.17.tar.gz | tar xvf -
+ cd eyeD3-0.6.17
./configure
make
make install (as root)
@@ -137,6 +137,13 @@
Set the value of a user text frame (i.e., TXXX). To
remove the frame, specify an empty value. e.g., --set-
user-text-frame="SomeDesc:"
+ --set-url-frame=FID:URL
+ Set the value of a URL frame. To remove the frame,
+ specify an empty value. e.g., --set-url-frame="WCOM:"
+ --set-user-url-frame=DESC:URL
+ Set the value of a user URL frame (i.e., WXXX). To
+ remove the frame, specify an empty value. e.g., --set-
+ user-url-frame="SomeDesc:"
--play-count=[+]N If this argument value begins with '+' the tag's play
count (PCNT) is incremented by N, otherwise the value
is set to exactly N.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/eyeD3-0.6.16/README.html new/eyeD3-0.6.17/README.html
--- old/eyeD3-0.6.16/README.html 2008-06-08 20:24:54.000000000 +0200
+++ new/eyeD3-0.6.17/README.html 2009-02-02 04:54:52.000000000 +0100
@@ -1,12 +1,12 @@
<HTML>
<HEAD>
<META NAME="generator" CONTENT="http://txt2tags.sf.net">
-<TITLE>eyeD3 0.6.16</TITLE>
+<TITLE>eyeD3 0.6.17</TITLE>
</HEAD><BODY BGCOLOR="white" TEXT="black">
-<P ALIGN="center"><CENTER><H1>eyeD3 0.6.16</H1>
+<P ALIGN="center"><CENTER><H1>eyeD3 0.6.17</H1>
<FONT SIZE=4>
<I>Travis Shirk <<A HREF="mailto:travis@pobox.com">travis@pobox.com</A>></I><BR>
-06.08.2008
+02.01.2009
</FONT></CENTER>
<P>
@@ -18,7 +18,7 @@
<A HREF="http://id3lib.sourceforge.net/id3/id3v1.html">v1.0/v1.1</A>
and <A HREF="http://id3lib.sourceforge.net/id3/develop.html">v2.3/v2.4</A>.
<P>
-The current stable version is 0.6.16. It and earlier versions are
+The current stable version is 0.6.17. It and earlier versions are
available <A HREF="http://eyed3.nicfit.net/releases/">here</A>.
<P>
See the <A HREF="NEWS">NEWS</A> and/or <A HREF="ChangeLog">ChangeLog</A> for changes.
@@ -31,8 +31,8 @@
<P>
<H2>Source tarball</H2>
<PRE>
- gzip -dc eyeD3-0.6.16.tar.gz | tar xvf -
- cd eyeD3-0.6.16
+ gzip -dc eyeD3-0.6.17.tar.gz | tar xvf -
+ cd eyeD3-0.6.17
./configure
make
make install (as root)
@@ -134,6 +134,13 @@
Set the value of a user text frame (i.e., TXXX). To
remove the frame, specify an empty value. e.g., --set-
user-text-frame="SomeDesc:"
+ --set-url-frame=FID:URL
+ Set the value of a URL frame. To remove the frame,
+ specify an empty value. e.g., --set-url-frame="WCOM:"
+ --set-user-url-frame=DESC:URL
+ Set the value of a user URL frame (i.e., WXXX). To
+ remove the frame, specify an empty value. e.g., --set-
+ user-url-frame="SomeDesc:"
--play-count=[+]N If this argument value begins with '+' the tag's play
count (PCNT) is incremented by N, otherwise the value
is set to exactly N.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/eyeD3-0.6.16/acsite.m4 new/eyeD3-0.6.17/acsite.m4
--- old/eyeD3-0.6.16/acsite.m4 2008-06-08 20:24:54.000000000 +0200
+++ new/eyeD3-0.6.17/acsite.m4 2009-02-02 04:54:52.000000000 +0100
@@ -16,32 +16,32 @@
dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
dnl
-AC_DEFUN([ACX_CHECK_PYTHON2], [
+AC_DEFUN([ACX_CHECK_PYTHON], [
PYTHON=""
- AC_ARG_WITH([python-23],
- AC_HELP_STRING([--with-python-23],
- [Force python 2.3 instead of >= 2.3]),
- [force23=1], [force23=0])
- if test $force23 -ne 0; then
- dnl This is a crappy hack for the rpm
- AC_PATH_PROGS([PYTHON], [python2.3])
- else
- AC_PATH_PROGS([PYTHON], [python python2 python2.3])
- fi
- if test -z "${PYTHON}"; then
- AC_MSG_ERROR([python version 2.3 or greater could not be found])
- elif test "`basename ${PYTHON}`" != "python2"; then
- dnl Test the interpreter for v 2.3
- AC_MSG_CHECKING([if ${PYTHON} is version 2.3 or greater])
- dnl Note the m4 quoting.
- if [${PYTHON} -V 2>&1 | grep '2\.[23456789]'] > /dev/null 2>&1; then
- [PYTHON_MINOR_VERSION=`${PYTHON} -V 2>&1 | sed 's/.*2\.\([3-9]\)[.abc].*/\1/'`]
- AC_MSG_RESULT([yes])
- else
- AC_MSG_RESULT([no])
- AC_MSG_ERROR([python version 2.3 or greater could not be found])
- fi
+ for python in python python2 python$1; do
+ dnl Unset to avoid cache hits that did not pass the version test
+ unset ac_cv_path_PYTHON
+ AC_PATH_PROGS([PYTHON], [$python])
+ if test -z "${PYTHON}"; then
+ continue
+ fi
+ AC_MSG_CHECKING([if ${PYTHON} is version >= $1])
+ version=`${PYTHON} -c 'import sys; print "%d.%d" % (sys.version_info[[0]], sys.version_info[[1]])'`
+ AX_COMPARE_VERSION([${version}], [ge], [$1])
+ if test ${ax_compare_version} = "true"; then
+ AC_MSG_RESULT([yes])
+ break
+ else
+ AC_MSG_RESULT([no])
+ PYTHON=""
+ fi
+ done
+
+ if test -z ${PYTHON}; then
+ AC_MSG_ERROR([python version $1 could not be found])
fi
+ PYTHON_VERSION=$version
+ AC_SUBST([PYTHON_VERSION])
])
AC_DEFUN([ACX_ID3LIB], [
@@ -84,3 +84,137 @@
AC_MSG_WARN([The eyeD3 utility application requires Optik.])
fi
])
+
+dnl #########################################################################
+AC_DEFUN([AX_COMPARE_VERSION], [
+ # Used to indicate true or false condition
+ ax_compare_version=false
+
+ # Convert the two version strings to be compared into a format that
+ # allows a simple string comparison. The end result is that a version
+ # string of the form 1.12.5-r617 will be converted to the form
+ # 0001001200050617. In other words, each number is zero padded to four
+ # digits, and non digits are removed.
+ AS_VAR_PUSHDEF([A],[ax_compare_version_A])
+ A=`echo "$1" | sed -e 's/\([[0-9]]*\)/Z\1Z/g' \
+ -e 's/Z\([[0-9]]\)Z/Z0\1Z/g' \
+ -e 's/Z\([[0-9]][[0-9]]\)Z/Z0\1Z/g' \
+ -e 's/Z\([[0-9]][[0-9]][[0-9]]\)Z/Z0\1Z/g' \
+ -e 's/[[^0-9]]//g'`
+
+ AS_VAR_PUSHDEF([B],[ax_compare_version_B])
+ B=`echo "$3" | sed -e 's/\([[0-9]]*\)/Z\1Z/g' \
+ -e 's/Z\([[0-9]]\)Z/Z0\1Z/g' \
+ -e 's/Z\([[0-9]][[0-9]]\)Z/Z0\1Z/g' \
+ -e 's/Z\([[0-9]][[0-9]][[0-9]]\)Z/Z0\1Z/g' \
+ -e 's/[[^0-9]]//g'`
+
+ dnl # In the case of le, ge, lt, and gt, the strings are sorted as necessary
+ dnl # then the first line is used to determine if the condition is true.
+ dnl # The sed right after the echo is to remove any indented white space.
+ m4_case(m4_tolower($2),
+ [lt],[
+ ax_compare_version=`echo "x$A
+x$B" | sed 's/^ *//' | sort -r | sed "s/x${A}/false/;s/x${B}/true/;1q"`
+ ],
+ [gt],[
+ ax_compare_version=`echo "x$A
+x$B" | sed 's/^ *//' | sort | sed "s/x${A}/false/;s/x${B}/true/;1q"`
+ ],
+ [le],[
+ ax_compare_version=`echo "x$A
+x$B" | sed 's/^ *//' | sort | sed "s/x${A}/true/;s/x${B}/false/;1q"`
+ ],
+ [ge],[
+ ax_compare_version=`echo "x$A
+x$B" | sed 's/^ *//' | sort -r | sed "s/x${A}/true/;s/x${B}/false/;1q"`
+ ],[
+ dnl Split the operator from the subversion count if present.
+ m4_bmatch(m4_substr($2,2),
+ [0],[
+ # A count of zero means use the length of the shorter version.
+ # Determine the number of characters in A and B.
+ ax_compare_version_len_A=`echo "$A" | awk '{print(length)}'`
+ ax_compare_version_len_B=`echo "$B" | awk '{print(length)}'`
+
+ # Set A to no more than B's length and B to no more than A's length.
+ A=`echo "$A" | sed "s/\(.\{$ax_compare_version_len_B\}\).*/\1/"`
+ B=`echo "$B" | sed "s/\(.\{$ax_compare_version_len_A\}\).*/\1/"`
+ ],
+ [[0-9]+],[
+ # A count greater than zero means use only that many subversions
+ A=`echo "$A" | sed "s/\(\([[0-9]]\{4\}\)\{m4_substr($2,2)\}\).*/\1/"`
+ B=`echo "$B" | sed "s/\(\([[0-9]]\{4\}\)\{m4_substr($2,2)\}\).*/\1/"`
+ ],
+ [.+],[
+ AC_WARNING(
+ [illegal OP numeric parameter: $2])
+ ],[])
+
+ # Pad zeros at end of numbers to make same length.
+ ax_compare_version_tmp_A="$A`echo $B | sed 's/./0/g'`"
+ B="$B`echo $A | sed 's/./0/g'`"
+ A="$ax_compare_version_tmp_A"
+
+ # Check for equality or inequality as necessary.
+ m4_case(m4_tolower(m4_substr($2,0,2)),
+ [eq],[
+ test "x$A" = "x$B" && ax_compare_version=true
+ ],
+ [ne],[
+ test "x$A" != "x$B" && ax_compare_version=true
+ ],[
+ AC_WARNING([illegal OP parameter: $2])
+ ])
+ ])
+
+ AS_VAR_POPDEF([A])dnl
+ AS_VAR_POPDEF([B])dnl
+
+ dnl # Execute ACTION-IF-TRUE / ACTION-IF-FALSE.
+ if test "$ax_compare_version" = "true" ; then
+ m4_ifvaln([$4],[$4],[:])dnl
+ m4_ifvaln([$5],[else $5])dnl
+ fi
+]) dnl AX_COMPARE_VERSION
+
+dnl AS_AC_EXPAND(VAR, CONFIGURE_VAR)
+dnl
+dnl example
+dnl AS_AC_EXPAND(SYSCONFDIR, $sysconfdir)
+dnl will set SYSCONFDIR to /usr/local/etc if prefix=/usr/local
+
+AC_DEFUN([AS_AC_EXPAND],
+[
+ EXP_VAR=[$1]
+ FROM_VAR=[$2]
+
+ dnl first expand prefix and exec_prefix if necessary
+ prefix_save=$prefix
+ exec_prefix_save=$exec_prefix
+
+ dnl if no prefix given, then use /usr/local, the default prefix
+ if test "x$prefix" = "xNONE"; then
+ prefix=$ac_default_prefix
+ fi
+ dnl if no exec_prefix given, then use prefix
+ if test "x$exec_prefix" = "xNONE"; then
+ exec_prefix=$prefix
+ fi
+
+ full_var="$FROM_VAR"
+ dnl loop until it doesn't change anymore
+ while true; do
+ new_full_var="`eval echo $full_var`"
+ if test "x$new_full_var"="x$full_var"; then break; fi
+ full_var=$new_full_var
+ done
+
+ dnl clean up
+ full_var=$new_full_var
+ AC_SUBST([$1], "$full_var")
+
+ dnl restore prefix and exec_prefix
+ prefix=$prefix_save
+ exec_prefix=$exec_prefix_save
+])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/eyeD3-0.6.16/bin/eyeD3 new/eyeD3-0.6.17/bin/eyeD3
--- old/eyeD3-0.6.16/bin/eyeD3 2008-06-08 20:24:54.000000000 +0200
+++ new/eyeD3-0.6.17/bin/eyeD3 2009-02-02 04:54:52.000000000 +0100
@@ -211,6 +211,16 @@
help="Set the value of a user text frame (i.e., TXXX). "\
"To remove the frame, specify an empty value. "\
"e.g., --set-user-text-frame=\"SomeDesc:\"");
+ grp1.add_option("--set-url-frame", action="append", type="string",
+ dest="url_frames", metavar="FID:URL", default=[],
+ help="Set the value of a URL frame. To remove the "\
+ "frame, specify an empty value. "\
+ "e.g., --set-url-frame=\"WCOM:\"");
+ grp1.add_option("--set-user-url-frame", action="append", type="string",
+ dest="user_url_frames", metavar="DESC:URL", default=[],
+ help="Set the value of a user URL frame (i.e., WXXX). "\
+ "To remove the frame, specify an empty value. "\
+ "e.g., --set-user-url-frame=\"SomeDesc:\"");
grp1.add_option("--play-count", action="store", type="string",
dest="play_count", metavar="[+]N", default=None,
help="If this argument value begins with '+' the tag's "\
@@ -302,8 +312,9 @@
################################################################################
def printGenres():
- # Filter out 'Unknown'
genres = [];
+ displayed = []
+ # Filter out 'Unknown'
for g in eyeD3.genres:
if g != "Unknown":
genres.append(g);
@@ -311,15 +322,20 @@
cols = 2;
offset = int(math.ceil(float(len(genres)) / cols));
for i in range(offset):
+ c1, c2 = '', ''
if i < len(genres):
- c1 = "%3d: %s" % (i, genres[i]);
+ if i not in displayed:
+ c1 = "%3d: %s" % (i, genres[i]);
+ displayed.append(i)
else:
c1 = "";
if (i * 2) < len(genres):
try:
- c2 = "%3d: %s" % (i + offset, genres[i + offset]);
+ if (i + offset) not in displayed:
+ c2 = "%3d: %s" % (i + offset, genres[i + offset]);
+ displayed.append(i + offset)
except IndexError:
- break;
+ pass
else:
c2 = "";
print c1 + (" " * (40 - len(c1))) + c2;
@@ -382,6 +398,7 @@
album = self.tag.getAlbum()
if album and not self.albums.has_key(album):
self.albums[album] = []
+ self.albums[album].append(self.audioFile)
elif album:
self.albums[album].append(self.audioFile)
@@ -804,6 +821,38 @@
printError(ex);
retval &= 0;
+ if self.opts.url_frames or self.opts.user_url_frames:
+ # Make a list of tuples (is_user_frame, arg)
+ frames = [(f in self.opts.user_url_frames, f)
+ for f in (self.opts.url_frames + self.opts.user_url_frames)]
+
+ for user_frame, f in frames:
+ args = f.split(self.opts.field_delim, 1)
+ if len(args) < 2:
+ raise TagException("Invalid argument: %s" % f)
+
+ desc, fid, url = None, None, None
+ if user_frame:
+ # FIXME
+ fid = "WXXX"
+ desc, url = args
+ else:
+ fid, url = args
+
+ if url:
+ printWarning("Setting %s frame to '%s'" % (fid, url))
+ else:
+ printWarning("Removing %s frame" % fid)
+ try:
+ if not user_frame:
+ tag.setURLFrame(fid, url)
+ else:
+ tag.addUserURLFrame(desc, url)
+ retval |= 1
+ except FrameException, ex:
+ printError(ex)
+ retval &= 0
+
if self.opts.textEncoding:
e = self.opts.textEncoding;
if e == "latin1":
@@ -980,8 +1029,8 @@
if u.header.id != eyeD3.frames.USERURL_FID:
print "%s: %s" % (u.header.id, u.url);
else:
- print "%s [Description: %s]:\n%s" % (u.header.id, u.description,
- u.url);
+ print "%s [Description: %s]: %s" % (u.header.id, u.description,
+ u.url)
images = tag.getImages();
if images:
@@ -1170,6 +1219,7 @@
import traceback
print >>sys.stderr, "Uncaught exception:", str(ex)
print >>sys.stderr, traceback.format_exc()
+ retval = 1
finally:
if profiling:
import pstats
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/eyeD3-0.6.16/configure new/eyeD3-0.6.17/configure
--- old/eyeD3-0.6.16/configure 2008-06-08 20:24:54.000000000 +0200
+++ new/eyeD3-0.6.17/configure 2009-02-02 04:54:52.000000000 +0100
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for eyeD3 0.6.16.
+# Generated by GNU Autoconf 2.61 for eyeD3 0.6.17.
#
# Report bugs to >.
#
@@ -576,8 +576,8 @@
# Identity of this package.
PACKAGE_NAME='eyeD3'
PACKAGE_TARNAME='eyeD3'
-PACKAGE_VERSION='0.6.16'
-PACKAGE_STRING='eyeD3 0.6.16'
+PACKAGE_VERSION='0.6.17'
+PACKAGE_STRING='eyeD3 0.6.17'
PACKAGE_BUGREPORT='Travis Shirk '
ac_subst_vars='SHELL
@@ -623,6 +623,7 @@
MANPAGE_DATE
SET_MAKE
PYTHON
+PYTHON_VERSION
LIBOBJS
LTLIBOBJS
EYED3_HELP'
@@ -1132,7 +1133,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures eyeD3 0.6.16 to adapt to many kinds of systems.
+\`configure' configures eyeD3 0.6.17 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1193,15 +1194,10 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of eyeD3 0.6.16:";;
+ short | recursive ) echo "Configuration of eyeD3 0.6.17:";;
esac
cat <<\_ACEOF
-Optional Packages:
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --with-python-23 Force python 2.3 instead of >= 2.3
-
Report bugs to >.
_ACEOF
ac_status=$?
@@ -1263,7 +1259,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-eyeD3 configure 0.6.16
+eyeD3 configure 0.6.17
generated by GNU Autoconf 2.61
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1279,7 +1275,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by eyeD3 $as_me 0.6.16, which was
+It was created by eyeD3 $as_me 0.6.17, which was
generated by GNU Autoconf 2.61. Invocation command line was
$ $0 $@
@@ -1684,16 +1680,9 @@
PYTHON=""
-
-# Check whether --with-python-23 was given.
-if test "${with_python_23+set}" = set; then
- withval=$with_python_23; force23=1
-else
- force23=0
-fi
-
- if test $force23 -ne 0; then
- for ac_prog in python2.3
+ for python in python python2 python2.5; do
+ unset ac_cv_path_PYTHON
+ for ac_prog in $python
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
@@ -1738,72 +1727,63 @@
test -n "$PYTHON" && break
done
- else
- for ac_prog in python python2 python2.3
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_path_PYTHON+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case $PYTHON in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
+ if test -z "${PYTHON}"; then
+ continue
+ fi
+ { echo "$as_me:$LINENO: checking if ${PYTHON} is version >= 2.5" >&5
+echo $ECHO_N "checking if ${PYTHON} is version >= 2.5... $ECHO_C" >&6; }
+ version=`${PYTHON} -c 'import sys; print "%d.%d" % (sys.version_info[0], sys.version_info[1])'`
- ;;
-esac
-fi
-PYTHON=$ac_cv_path_PYTHON
-if test -n "$PYTHON"; then
- { echo "$as_me:$LINENO: result: $PYTHON" >&5
-echo "${ECHO_T}$PYTHON" >&6; }
-else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
+ # Used to indicate true or false condition
+ ax_compare_version=false
+ # Convert the two version strings to be compared into a format that
+ # allows a simple string comparison. The end result is that a version
+ # string of the form 1.12.5-r617 will be converted to the form
+ # 0001001200050617. In other words, each number is zero padded to four
+ # digits, and non digits are removed.
- test -n "$PYTHON" && break
-done
+ ax_compare_version_A=`echo "${version}" | sed -e 's/\([0-9]*\)/Z\1Z/g' \
+ -e 's/Z\([0-9]\)Z/Z0\1Z/g' \
+ -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \
+ -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \
+ -e 's/[^0-9]//g'`
- fi
- if test -z "${PYTHON}"; then
- { { echo "$as_me:$LINENO: error: python version 2.3 or greater could not be found" >&5
-echo "$as_me: error: python version 2.3 or greater could not be found" >&2;}
- { (exit 1); exit 1; }; }
- elif test "`basename ${PYTHON}`" != "python2"; then
- { echo "$as_me:$LINENO: checking if ${PYTHON} is version 2.3 or greater" >&5
-echo $ECHO_N "checking if ${PYTHON} is version 2.3 or greater... $ECHO_C" >&6; }
- if ${PYTHON} -V 2>&1 | grep '2\.[23456789]' > /dev/null 2>&1; then
- PYTHON_MINOR_VERSION=`${PYTHON} -V 2>&1 | sed 's/.*2\.\([3-9]\)[.abc].*/\1/'`
- { echo "$as_me:$LINENO: result: yes" >&5
+
+ ax_compare_version_B=`echo "2.5" | sed -e 's/\([0-9]*\)/Z\1Z/g' \
+ -e 's/Z\([0-9]\)Z/Z0\1Z/g' \
+ -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \
+ -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \
+ -e 's/[^0-9]//g'`
+
+
+ ax_compare_version=`echo "x$ax_compare_version_A
+x$ax_compare_version_B" | sed 's/^ *//' | sort -r | sed "s/x${ax_compare_version_A}/true/;s/x${ax_compare_version_B}/false/;1q"`
+
+
+
+ if test "$ax_compare_version" = "true" ; then
+ :
+ fi
+
+ if test ${ax_compare_version} = "true"; then
+ { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
- else
- { echo "$as_me:$LINENO: result: no" >&5
+ break
+ else
+ { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
- { { echo "$as_me:$LINENO: error: python version 2.3 or greater could not be found" >&5
-echo "$as_me: error: python version 2.3 or greater could not be found" >&2;}
+ PYTHON=""
+ fi
+ done
+
+ if test -z ${PYTHON}; then
+ { { echo "$as_me:$LINENO: error: python version 2.5 could not be found" >&5
+echo "$as_me: error: python version 2.5 could not be found" >&2;}
{ (exit 1); exit 1; }; }
- fi
fi
+ PYTHON_VERSION=$version
+
ac_config_files="$ac_config_files Makefile setup.py etc/eyeD3.spec src/eyeD3/__init__.py doc/eyeD3.1"
@@ -2234,7 +2214,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by eyeD3 $as_me 0.6.16, which was
+This file was extended by eyeD3 $as_me 0.6.17, which was
generated by GNU Autoconf 2.61. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -2277,7 +2257,7 @@
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-eyeD3 config.status 0.6.16
+eyeD3 config.status 0.6.17
configured by $0, generated by GNU Autoconf 2.61,
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
@@ -2483,11 +2463,12 @@
MANPAGE_DATE!$MANPAGE_DATE$ac_delim
SET_MAKE!$SET_MAKE$ac_delim
PYTHON!$PYTHON$ac_delim
+PYTHON_VERSION!$PYTHON_VERSION$ac_delim
LIBOBJS!$LIBOBJS$ac_delim
LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF
- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 45; then
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 46; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
@@ -3247,7 +3228,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by eyeD3 $as_me 0.6.16, which was
+This file was extended by eyeD3 $as_me 0.6.17, which was
generated by GNU Autoconf 2.61. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -3290,7 +3271,7 @@
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-eyeD3 config.status 0.6.16
+eyeD3 config.status 0.6.17
configured by $0, generated by GNU Autoconf 2.61,
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
@@ -3497,12 +3478,13 @@
MANPAGE_DATE!$MANPAGE_DATE$ac_delim
SET_MAKE!$SET_MAKE$ac_delim
PYTHON!$PYTHON$ac_delim
+PYTHON_VERSION!$PYTHON_VERSION$ac_delim
LIBOBJS!$LIBOBJS$ac_delim
LTLIBOBJS!$LTLIBOBJS$ac_delim
EYED3_HELP!$EYED3_HELP$ac_delim
_ACEOF
- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 46; then
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 47; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/eyeD3-0.6.16/doc/eyeD3.1.in new/eyeD3-0.6.17/doc/eyeD3.1.in
--- old/eyeD3-0.6.16/doc/eyeD3.1.in 2008-06-08 20:24:54.000000000 +0200
+++ new/eyeD3-0.6.17/doc/eyeD3.1.in 2009-02-02 04:54:52.000000000 +0100
@@ -150,6 +150,20 @@
Set the value of a specific (i.e., FID) text frame. To remove the frame,
specify an empty value. e.g., --set-text-frame="TDRC:"
.TP
+\fB\-\-set\-user\-text\-frame=\fRDESC:TEXT\fR
+Set the value of a TXXX text frame with a unique description.
+To remove the frame, specify an empty value.
+e.g., --set-user-text-frame="Description:"
+.TP
+\fB\-\-set\-url\-frame=\fRFID:URL\fR
+Set the value of a specific (i.e., FID) URL frame. To remove the frame,
+specify an empty URL. e.g., --set-url-frame="WCOM:"
+.TP
+\fB\-\-set\-user\-url\-frame=\fRDESC:URL\fR
+Set the value of a WXXX frame with unique description string.
+To remove the frame, specify an empty URL.
+e.g., --set-user-url-frame="Description:"
+.TP
\fB\-\-play\-count=\fR[+]N\fR
Set the play count (PCNT). If the argument value begins with '+' the value is
incremented by N, otherwise it is set to exactly N.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/eyeD3-0.6.16/etc/eyeD3-0.6.16.ebuild new/eyeD3-0.6.17/etc/eyeD3-0.6.16.ebuild
--- old/eyeD3-0.6.16/etc/eyeD3-0.6.16.ebuild 2008-06-08 20:24:54.000000000 +0200
+++ new/eyeD3-0.6.17/etc/eyeD3-0.6.16.ebuild 1970-01-01 01:00:00.000000000 +0100
@@ -1,27 +0,0 @@
-# Copyright 1999-2007 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /opt/data/files/travis/cvsroot/eyeD3/etc/gentoo/Attic/eyeD3-0.6.12.ebuild,v 1.1.2.1 2007/02/18 23:34:46 travis Exp $
-
-NEED_PYTHON=2.3
-
-inherit distutils
-
-DESCRIPTION="Module for manipulating ID3 (v1 + v2) tags in Python"
-HOMEPAGE="http://eyed3.nicfit.net/"
-SRC_URI="http://eyed3.nicfit.net/releases/${P}.tar.gz"
-IUSE=""
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~ia64 ~ppc ~sparc ~x86"
-
-src_compile() {
- econf || die
- distutils_src_compile || die
-}
-
-src_install() {
- make DESTDIR="${D}" all install || die
-
- dodoc NEWS TODO
- dohtml README.html
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/eyeD3-0.6.16/etc/eyeD3-0.6.17.ebuild new/eyeD3-0.6.17/etc/eyeD3-0.6.17.ebuild
--- old/eyeD3-0.6.16/etc/eyeD3-0.6.17.ebuild 1970-01-01 01:00:00.000000000 +0100
+++ new/eyeD3-0.6.17/etc/eyeD3-0.6.17.ebuild 2009-02-02 04:54:52.000000000 +0100
@@ -0,0 +1,27 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /opt/data/files/travis/cvsroot/eyeD3/etc/gentoo/Attic/eyeD3-0.6.12.ebuild,v 1.1.2.1 2007/02/18 23:34:46 travis Exp $
+
+NEED_PYTHON=2.3
+
+inherit distutils
+
+DESCRIPTION="Module for manipulating ID3 (v1 + v2) tags in Python"
+HOMEPAGE="http://eyed3.nicfit.net/"
+SRC_URI="http://eyed3.nicfit.net/releases/${P}.tar.gz"
+IUSE=""
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ia64 ~ppc ~sparc ~x86"
+
+src_compile() {
+ econf || die
+ distutils_src_compile || die
+}
+
+src_install() {
+ make DESTDIR="${D}" all install || die
+
+ dodoc NEWS TODO
+ dohtml README.html
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/eyeD3-0.6.16/src/eyeD3/frames.py new/eyeD3-0.6.17/src/eyeD3/frames.py
--- old/eyeD3-0.6.16/src/eyeD3/frames.py 2008-06-08 20:24:54.000000000 +0200
+++ new/eyeD3-0.6.17/src/eyeD3/frames.py 2009-02-02 04:54:52.000000000 +0100
@@ -729,13 +729,14 @@
self.encoding = data[0];
TRACE_MSG("TextFrame encoding: %s" % id3EncodingToString(self.encoding));
try:
- self.text = unicode(data[1:], id3EncodingToString(self.encoding));
+ data = data[1:]
+ self.text = encodeUnicode(data, id3EncodingToString(self.encoding))
if not strictID3():
self.text = cleanNulls(self.text)
except TypeError, excArg:
# if data is already unicode, just copy it
if excArg.args == ("decoding Unicode is not supported",):
- self.text = data[1:];
+ self.text = data
if not strictID3():
self.text = cleanNulls(self.text)
else:
@@ -922,9 +923,9 @@
TRACE_MSG("UserTextFrame encoding: %s" %\
id3EncodingToString(self.encoding));
(d, t) = splitUnicode(data[1:], self.encoding);
- self.description = unicode(d, id3EncodingToString(self.encoding));
+ self.description = encodeUnicode(d, id3EncodingToString(self.encoding))
TRACE_MSG("UserTextFrame description: %s" % self.description);
- self.text = unicode(t, id3EncodingToString(self.encoding));
+ self.text = encodeUnicode(t, id3EncodingToString(self.encoding))
if not strictID3():
self.text = cleanNulls(self.text)
TRACE_MSG("UserTextFrame text: %s" % self.text);
@@ -953,7 +954,7 @@
################################################################################
class URLFrame(Frame):
- url = "";
+ url = ""
# Data string format:
# url
@@ -966,27 +967,27 @@
self.url = url
# Data string format:
- # url
+ # url (ascii)
def _set(self, data, frameHeader):
- fid = frameHeader.id;
+ fid = frameHeader.id
if not URL_FRAME_RX.match(fid) or USERURL_FRAME_RX.match(fid):
- raise FrameException("Invalid frame id for URLFrame: " + fid);
- data = self.disassembleFrame(data);
- self.url = data;
+ raise FrameException("Invalid frame id for URLFrame: " + fid)
+ data = self.disassembleFrame(data)
+ self.url = data
if not strictID3():
self.url = cleanNulls(self.url)
def render(self):
- data = str(self.url);
- return self.assembleFrame(data);
+ data = str(self.url)
+ return self.assembleFrame(data)
def __str__(self):
- return '<%s (%s): %s>' % (self.getFrameDesc(), self.header.id,
- self.url);
+ return '<%s (%s): %s>' % (self.getFrameDesc(), self.header.id, self.url)
################################################################################
class UserURLFrame(URLFrame):
- description = u"";
+ description = u""
+ url = ""
# Data string format:
# encoding (one byte) + description + "\x00" + url
@@ -994,46 +995,46 @@
encoding=DEFAULT_ENCODING, unsync_default=False):
Frame.__init__(self, frameHeader, unsync_default)
if data:
- self._set(data, frameHeader);
+ self._set(data, frameHeader)
else:
- assert(encoding);
- assert(description and isinstance(description, unicode));
- assert(url and isinstance(url, str));
- self.encoding = encoding;
- self.url = url;
- self.description = description;
+ assert(encoding)
+ assert(description and isinstance(description, unicode))
+ assert(url and isinstance(url, str))
+ self.encoding = encoding
+ self.url = url
+ self.description = description
# Data string format:
# encoding (one byte) + description + "\x00" + url;
def _set(self, data, frameHeader):
- assert(data and frameHeader);
+ assert(data and frameHeader)
if not USERURL_FRAME_RX.match(frameHeader.id):
raise FrameException("Invalid frame id for UserURLFrame: " +\
- frameHeader.id);
+ frameHeader.id)
data = self.disassembleFrame(data);
- self.encoding = data[0];
+ self.encoding = data[0]
TRACE_MSG("UserURLFrame encoding: %s" %\
- id3EncodingToString(self.encoding));
+ id3EncodingToString(self.encoding))
try:
- (d, u) = splitUnicode(data[1:], self.encoding);
+ (d, u) = splitUnicode(data[1:], self.encoding)
except ValueError, ex:
if strictID3():
raise FrameException("Invalid WXXX frame, no null byte")
d = data[1:]
u = ""
- self.description = unicode(d, id3EncodingToString(self.encoding));
- TRACE_MSG("UserURLFrame description: %s" % self.description);
- self.url = u;
+ self.description = encodeUnicode(d, id3EncodingToString(self.encoding))
+ TRACE_MSG("UserURLFrame description: %s" % self.description)
+ self.url = u
if not strictID3():
self.url = cleanNulls(self.url)
- TRACE_MSG("UserURLFrame text: %s" % self.url);
+ TRACE_MSG("UserURLFrame text: %s" % self.url)
def render(self):
data = self.encoding +\
self.description.encode(id3EncodingToString(self.encoding)) +\
- self.getTextDelim() + self.url;
- return self.assembleFrame(data);
+ self.getTextDelim() + self.url
+ return self.assembleFrame(data)
def __unicode__(self):
return u'<%s (%s): %s [Encoding: %s] [Desc: %s]>' %\
@@ -1079,7 +1080,7 @@
try:
self.lang = str(data[1:4]).strip("\x00");
# Test ascii encoding
- temp_lang = unicode(self.lang, "ascii");
+ temp_lang = encodeUnicode(self.lang, "ascii")
if self.lang and \
not re.compile("[A-Z][A-Z][A-Z]", re.IGNORECASE).match(self.lang):
if strictID3():
@@ -1093,8 +1094,8 @@
self.lang = "";
try:
(d, c) = splitUnicode(data[4:], self.encoding);
- self.description = unicode(d, id3EncodingToString(self.encoding));
- self.comment = unicode(c, id3EncodingToString(self.encoding));
+ self.description = encodeUnicode(d, id3EncodingToString(self.encoding))
+ self.comment = encodeUnicode(c, id3EncodingToString(self.encoding))
except ValueError:
if strictID3():
raise FrameException("Invalid comment; no description/comment");
@@ -1161,7 +1162,7 @@
try:
self.lang = str(data[1:4]).strip("\x00");
# Test ascii encoding
- temp_lang = unicode(self.lang, "ascii");
+ temp_lang = encodeUnicode(self.lang, "ascii")
if self.lang and \
not re.compile("[A-Z][A-Z][A-Z]", re.IGNORECASE).match(self.lang):
if strictID3():
@@ -1175,8 +1176,8 @@
self.lang = "";
try:
(d, c) = splitUnicode(data[4:], self.encoding);
- self.description = unicode(d, id3EncodingToString(self.encoding));
- self.lyrics = unicode(c, id3EncodingToString(self.encoding));
+ self.description = encodeUnicode(d, id3EncodingToString(self.encoding))
+ self.lyrics = encodeUnicode(c, id3EncodingToString(self.encoding))
except ValueError:
if strictID3():
raise FrameException("Invalid lyrics; no description/lyrics");
@@ -1350,7 +1351,7 @@
(desc, img) = splitUnicode(buffer, self.encoding);
TRACE_MSG("description len: %d" % len(desc));
TRACE_MSG("description len: %d" % len(img));
- self.description = unicode(desc, id3EncodingToString(self.encoding));
+ self.description = encodeUnicode(desc, id3EncodingToString(self.encoding))
TRACE_MSG("APIC description: " + self.description);
if self.mimeType.find("-->") != -1:
@@ -1517,7 +1518,7 @@
def create(objFile, mime = u"", desc = u"", filename = None,
encoding = DEFAULT_ENCODING):
if filename == None:
- filename = unicode(os.path.basename(objFile));
+ filename = encodeUnicode(os.path.basename(objFile))
if not isinstance(desc, unicode) or \
(not isinstance(filename, unicode) and filename != ""):
raise FrameException("Wrong description and/or filename type.");
@@ -1594,8 +1595,9 @@
TRACE_MSG("filename len: %d" % len(filename));
TRACE_MSG("description len: %d" % len(desc));
TRACE_MSG("data len: %d" % len(obj));
- self.filename = unicode(filename, id3EncodingToString(self.encoding));
- self.description = unicode(desc, id3EncodingToString(self.encoding));
+ self.filename = encodeUnicode(filename,
+ id3EncodingToString(self.encoding))
+ self.description = encodeUnicode(desc, id3EncodingToString(self.encoding))
TRACE_MSG("GEOB filename: " + self.filename);
TRACE_MSG("GEOB description: " + self.description);
@@ -1646,8 +1648,8 @@
def _set(self, data, frameHeader):
assert(frameHeader);
- assert(len(data) >= 4);
- self.count = long(bytes2dec(data));
+ # data of less then 4 bytes is handled with with 'sz' arg
+ self.count = long(bytes2dec(data, sz=(len(data) * 2)))
def render(self):
data = dec2bytes(self.count, 32);
@@ -1914,13 +1916,11 @@
# Set a text frame value. Text frame IDs must be unique. If a frame with
# the same Id is already in the list it's value is changed, otherwise
# the frame is added.
- def setTextFrame(self, frameId, text, encoding = None):
+ def setTextFrame(self, frameId, text, encoding=None):
assert(type(text) == unicode);
if not TEXT_FRAME_RX.match(frameId):
raise FrameException("Invalid Frame ID: " + frameId);
- if USERTEXT_FRAME_RX.match(frameId):
- raise FrameException("Wrong method, use setUserTextFrame");
if self[frameId]:
curr = self[frameId][0];
@@ -1941,6 +1941,19 @@
else:
self.addFrame(TextFrame(h, encoding = encoding, text = text));
+ def setURLFrame(self, frame_id, url):
+ assert(type(url) == str)
+
+ if frame_id not in URL_FIDS:
+ raise FrameException("Invalid URL frame ID: %s" % frame_id)
+
+ if self[frame_id]:
+ self[frame_id][0].url = url
+ else:
+ h = FrameHeader(self.tagHeader)
+ h.id = frame_id
+ self.addFrame(URLFrame(h, url=url))
+
# If a user text frame with the same description exists then
# the frame text is replaced, otherwise the frame is added.
def setCommentFrame(self, comment, description, lang = DEFAULT_LANG,
@@ -2026,7 +2039,7 @@
# If a comment frame with the same language and description exists then
# the comment text is replaced, otherwise the frame is added.
- def setUserTextFrame(self, txt, description, encoding = None):
+ def setUserTextFrame(self, txt, description, encoding=None):
assert(isinstance(txt, unicode));
assert(isinstance(description, unicode));
@@ -2056,6 +2069,34 @@
description = description,
text = txt));
+ def setUserURLFrame(self, url, description, encoding=None):
+ assert(isinstance(url, str))
+ assert(isinstance(description, unicode))
+
+ if self[USERURL_FID]:
+ found = 0
+ for f in self[USERURL_FID]:
+ if f.description == description:
+ f.url = url
+ if encoding:
+ f.encoding = encoding
+ found = 1
+ break
+ if not found:
+ if not encoding:
+ encoding = DEFAULT_ENCODING
+ h = FrameHeader(self.tagHeader)
+ h.id = USERURL_FID
+ self.addFrame(UserURLFrame(h, encoding=encoding,
+ description=description, url=url))
+ else:
+ if not encoding:
+ encoding = DEFAULT_ENCODING
+ h = FrameHeader(self.tagHeader)
+ h.id = USERURL_FID
+ self.addFrame(UserURLFrame(h, encoding=encoding,
+ description=description, url=url))
+
# This method removes all frames with the matching frame ID.
# The number of frames removed is returned.
# Note that calling this method with a key like "COMM" may remove more
@@ -2183,3 +2224,25 @@
return originalId
return TAGS2_2_TO_TAGS_2_3_AND_4[originalId]
+def dump_data_to_file(s, f):
+ f = file(f, "w")
+ for c in s:
+ f.write("\\x%.2x" % ord(c))
+ f.write("\n")
+ f.close()
+
+##
+# A suxtitute for Python's 'unicode' constructor which handles invalid
+# string encodings (as seen in the real world).
+def encodeUnicode(bytes, encoding):
+ if (encoding == UTF_16_ENCODING and
+ len(bytes) % 2 and
+ bytes[-2:] == "\x00\x00"):
+ # Fixes: utf16, odd number of bytes (including 2-byte BOM) where
+ # the final byte is \x00
+ # Users have sent tags with an invalid utf16 encoding thus
+ # python's unicode type can't decode. Fix this edge case.
+ bytes = bytes[:-1]
+
+ return unicode(bytes, encoding)
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/eyeD3-0.6.16/src/eyeD3/tag.py new/eyeD3-0.6.17/src/eyeD3/tag.py
--- old/eyeD3-0.6.16/src/eyeD3/tag.py 2008-06-08 20:24:54.000000000 +0200
+++ new/eyeD3-0.6.17/src/eyeD3/tag.py 2009-02-02 04:54:52.000000000 +0100
@@ -698,11 +698,11 @@
# Both URLFrame and UserURLFrame objects are returned. UserURLFrames
# add a description and encoding, and have a different frame ID.
def getURLs(self):
- urls = list();
- for fid in URL_FIDS:
- urls.extend(self.frames[fid]);
- urls.extend(self.frames[USERURL_FID]);
- return urls;
+ urls = []
+ for fid in URL_FIDS:
+ urls.extend(self.frames[fid])
+ urls.extend(self.frames[USERURL_FID])
+ return urls
def getUserTextFrames(self):
return self.frames[USERTEXT_FID];
@@ -891,9 +891,23 @@
self.frames.setUserTextFrame(self.strToUnicode(text),
self.strToUnicode(desc), self.encoding);
+ def addUserURLFrame(self, desc, url):
+ if not url:
+ u_frames = self.frames[USERURL_FID]
+ for u in u_frames:
+ if u.description == desc:
+ self.frames.remove(u)
+ break
+ else:
+ self.frames.setUserURLFrame(str(url), self.strToUnicode(desc),
+ self.encoding)
+
def removeUserTextFrame(self, desc):
self.addUserTextFrame(desc, "")
+ def removeUserURLFrame(self, desc):
+ self.addUserURLFrame(desc, "")
+
def removeComments(self):
return self.frames.removeFramesByID(COMMENT_FID);
@@ -1007,6 +1021,12 @@
else:
self.frames.setTextFrame(fid, self.strToUnicode(txt), self.encoding);
+ def setURLFrame(self, fid, url):
+ if not url:
+ self.frames.removeFramesByID(fid)
+ else:
+ self.frames.setURLFrame(fid, url)
+
def setTextEncoding(self, enc):
if enc != LATIN1_ENCODING and enc != UTF_16_ENCODING and\
enc != UTF_16BE_ENCODING and enc != UTF_8_ENCODING:
@@ -1523,7 +1543,7 @@
# Non standard, but witnessed.
# Match genre alone. e.g. Rap, Rock, blues, 'Rock|Punk|Pop-Punk', etc
- regex = re.compile("^[A-Z 0-9+/\-\|!&]+\00*$", re.IGNORECASE)
+ regex = re.compile("^[A-Z 0-9+/\-\|!&'\.]+\00*$", re.IGNORECASE)
if regex.match(genreStr):
self.setName(genreStr);
return;
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org