Update of /cvsroot/gtkpod/libgpod/bindings/python
In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv4344/python

Modified Files:
        ipod.py 
Log Message:
Translate track attributes to UTF-8 (dropping any chars we can't do), and if 
there is no title tag in the mp3 then use the filename (not the whole pathname)

Index: ipod.py
===================================================================
RCS file: /cvsroot/gtkpod/libgpod/bindings/python/ipod.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- ipod.py     10 Feb 2007 13:23:10 -0000      1.12
+++ ipod.py     10 Feb 2007 23:14:23 -0000      1.13
@@ -322,7 +322,7 @@
                 except AttributeError:
                     pass
             if self['title'] is None:
-                self['title'] = filename
+                self['title'] = os.path.splitext(os.path.split(filename)[1])[0]
             try:
                 self['genre'] = tag.getGenre().name
             except AttributeError:
@@ -427,7 +427,7 @@
             gpod.sw_set_track_userdata(self._track, value)
             return
         if type(value) == types.UnicodeType:
-            value = value.encode()
+            value = value.encode('UTF-8','ignore')
         if item in self._proxied_attributes:
             return setattr(self._track, item, value)
         else:


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2

Reply via email to