Update of /cvsroot/freevo/freevo/src/audio/eyed3
In directory sc8-pr-cvs1:/tmp/cvs-serv22342

Modified Files:
        __init__.py binfuncs.py frames.py mp3.py utils.py 
Removed Files:
        ID3v2.py 
Log Message:
Synced to latest eyeD3 release (0.5.0) which contains many fixes for
issues with tags and more completely supports the ID3v2.x specification.

Please make sure it works for you.


Index: __init__.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/audio/eyed3/__init__.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** __init__.py 24 Nov 2002 13:58:44 -0000      1.1
--- __init__.py 8 Jun 2003 05:33:15 -0000       1.2
***************
*** 1,5 ****
  #
! #  Copyright (C) 2002  Travis Shirk <[EMAIL PROTECTED]>
! #  Copyright (C) 2001  Ryan Finne <[EMAIL PROTECTED]>
  #
  #  This program is free software; you can redistribute it and/or modify
--- 1,5 ----
+ ################################################################################
  #
! #  Copyright (C) 2002-2003  Travis Shirk <[EMAIL PROTECTED]>
  #
[...1097 lines suppressed...]
!       self.append(string.lower('JPop'));
!       self.append(string.lower('Synthpop'));
!       
!       # This list is extened with None until 'Unknown' is added at index 255.
!       self.extend([None] * (256 - len(self) - 1));
!       self.append(string.lower('Unknown'));
  
! #
! # Module level globals.
! #
! genres = GenreMap();
  
--- 32,38 ----
  ID3_V2_4            = 0x24;
  #ID3_V2_5            = 0x28; # This does not seem imminent.
! ID3_DEFAULT_VERSION = ID3_V2_4;
! ID3_ANY_VERSION     = ID3_V1 | ID3_V2;
  
! from eyeD3.tag import *;
  

Index: binfuncs.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/audio/eyed3/binfuncs.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** binfuncs.py 24 Nov 2002 13:58:44 -0000      1.1
--- binfuncs.py 8 Jun 2003 05:33:15 -0000       1.2
***************
*** 1,5 ****
  #
  #  Copyright (C) 2001  Ryan Finne <[EMAIL PROTECTED]>
- #  Copyright (C) 2002  Travis Shirk <[EMAIL PROTECTED]>
  #
  #  This program is free software; you can redistribute it and/or modify
--- 1,6 ----
+ ################################################################################
  #
+ #  Copyright (C) 2002-2003  Travis Shirk <[EMAIL PROTECTED]>
  #  Copyright (C) 2001  Ryan Finne <[EMAIL PROTECTED]>
  #
  #  This program is free software; you can redistribute it and/or modify
***************
*** 17,20 ****
--- 18,22 ----
  #  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  #
+ ################################################################################
  
  # Accepts a string of bytes (chars) and returns an array of bits
***************
*** 109,129 ****
        return x;
  
!    bits = [];
!    bits.extend(x);
!    # LSB first.
!    bits.reverse();
! 
!    c = 1;
!    while c <= (len(bits) // 8):
!       i = (c * 8) - 1;
!       if bits[i]:
!          bits.insert(i, 0);
!       c += 1;
!    if len(bits) > 32:
!       bits = bits[:32];
!    elif len(bits) < 32:
!       bits.extend([0] * (32 - len(bits)));
  
-    # MSB first.
-    bits.reverse();
     return bits;
--- 111,123 ----
        return x;
  
!    n = bin2dec(x);
!    bites = "";
!    bites += chr((n >> 21) & 0x7f);
!    bites += chr((n >> 14) & 0x7f);
!    bites += chr((n >>  7) & 0x7f);
!    bites += chr((n >>  0) & 0x7f);
!    bits = bytes2bin(bites);
!    if len(bits) < 32:
!       bits = ([0] * (32 - len(x))) + bits;
  
     return bits;

Index: frames.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/audio/eyed3/frames.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** frames.py   24 Nov 2002 13:58:44 -0000      1.1
--- frames.py   8 Jun 2003 05:33:15 -0000       1.2
***************
*** 1,4 ****
  #
! #  Copyright (C) 2002  Travis Shirk <[EMAIL PROTECTED]>
  #  Copyright (C) 2001  Ryan Finne <[EMAIL PROTECTED]>
  #
--- 1,5 ----
+ ################################################################################
  #
! #  Copyright (C) 2002-2003  Travis Shirk <[EMAIL PROTECTED]>
  #  Copyright (C) 2001  Ryan Finne <[EMAIL PROTECTED]>
  #
[...1235 lines suppressed...]
***************
*** 864,870 ****
--- 1211,1219 ----
           else:
              f = URLFrame(data, frameHeader);
+ 
        # CD Id frame.
        elif CDID_FRAME_RX.match(frameHeader.id):
           f = MusicCDIdFrame(data, frameHeader);
+ 
        # Attached picture
        elif IMAGE_FRAME_RX.match(frameHeader.id):
***************
*** 876,880 ****
        return f;
  
-    #######################################################################
     # Accepts both int (indexed access) and string keys (a valid frame Id).
     # A list of frames (commonly with only one element) is returned when the
--- 1225,1228 ----

Index: mp3.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/audio/eyed3/mp3.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** mp3.py      24 Nov 2002 13:58:44 -0000      1.1
--- mp3.py      8 Jun 2003 05:33:15 -0000       1.2
***************
*** 1,5 ****
! #!/usr/bin/env python2
  #
! #  Copyright (C) 2002  Travis Shirk <[EMAIL PROTECTED]>
  #
  #  This program is free software; you can redistribute it and/or modify
--- 1,5 ----
! ################################################################################
  #
! #  Copyright (C) 2002-2003  Travis Shirk <[EMAIL PROTECTED]>
  #
  #  This program is free software; you can redistribute it and/or modify
***************
*** 17,23 ****
  #  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  #
! import utils, binfuncs;
! from binfuncs import *;
! from utils import *;
  
  #######################################################################
--- 17,23 ----
  #  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  #
! ################################################################################
! from eyeD3.binfuncs import *;
! from eyeD3.utils import *;
  
  #######################################################################

Index: utils.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/audio/eyed3/utils.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** utils.py    24 Nov 2002 13:58:44 -0000      1.1
--- utils.py    8 Jun 2003 05:33:15 -0000       1.2
***************
*** 25,26 ****
--- 25,106 ----
     if TRACE:
        print prefix + msg;
+ ################################################################################
+ #  Copyright (C) 2003  Travis Shirk <[EMAIL PROTECTED]>
+ #
+ #  This program is free software; you can redistribute it and/or modify
+ #  it under the terms of the GNU General Public License as published by
+ #  the Free Software Foundation; either version 2 of the License, or
+ #  (at your option) any later version.
+ #
+ #  This program is distributed in the hope that it will be useful,
+ #  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ #  GNU General Public License for more details.
+ #
+ #  You should have received a copy of the GNU General Public License
+ #  along with this program; if not, write to the Free Software
+ #  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ #
+ #  $Id$
+ ################################################################################
+ from eyeD3 import *;
+ 
+ def versionsToConstant(v):
+    major = v[0];
+    minor = v[1];
+    rev = v[2];
+    if major == 1:
+       if minor == 0:
+        return ID3_V1_0;
+       elif minor == 1:
+        return ID3_V1_1;
+    elif major == 2:
+       if minor == 3:
+        return ID3_V2_3;
+       elif minor == 4:
+        return ID3_V2_4;
+    raise str("Invalid ID3 version: %s" % str(v));
+ 
+ def versionToString(v):
+    if v & ID3_V1:
+       if v == ID3_V1_0:
+        return "v1.0";
+       elif v == ID3_V1_1:
+        return "v1.1";
+       elif v == ID3_V1:
+          return "v1.x";
+    elif v & ID3_V2:
+       if v == ID3_V2_3:
+        return "v2.3";
+       elif v == ID3_V2_4:
+        return "v2.4";
+       elif v == ID3_V2:
+          return "v2.x";
+ 
+    if v == ID3_ANY_VERSION:
+       return "v1.x/v2.x";
+    raise str("versionToString - Invalid ID3 version constant: %s" % hex(v));
+ 
+ def constantToVersions(v):
+    if v & ID3_V1:
+       if v == ID3_V1_0:
+          return [1, 0, 0];
+       elif v == ID3_V1_1:
+          return [1, 1, 0];
+       elif v == ID3_V1:
+          return [1, 1, 0];
+    elif v & ID3_V2:
+       if v == ID3_V2_3:
+          return [2, 3, 0];
+       elif v == ID3_V2_4:
+          return [2, 4, 0];
+       elif v == ID3_V2:
+          return [2, 4, 0];
+    raise str("constantToVersions - Invalid ID3 version constant: %s" % hex(v));
+ 
+ ################################################################################
+ TRACE = 0;
+ prefix = "eyeD3 trace> ";
+ def TRACE_MSG(msg):
+    if TRACE:
+       print prefix + msg;

--- ID3v2.py DELETED ---




-------------------------------------------------------
This SF.net email is sponsored by:  Etnus, makers of TotalView, The best
thread debugger on the planet. Designed with thread debugging features
you've never dreamed of, try TotalView 6 free at www.etnus.com.
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to