Update of /cvsroot/gtkpod/libgpod/bindings/python
In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv1190/bindings/python
Modified Files:
gtkpod.py
Log Message:
Correction to 1.4 - sha1/md5_hash handling in ext db. Also, don't write
filename_ipod if we don't have a value for it.
Index: gtkpod.py
===================================================================
RCS file: /cvsroot/gtkpod/libgpod/bindings/python/gtkpod.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- gtkpod.py 14 Jan 2007 21:23:43 -0000 1.4
+++ gtkpod.py 14 Jan 2007 22:25:25 -0000 1.5
@@ -53,14 +53,19 @@
write_pair("id", track['id'])
if not track['userdata']:
track['userdata'] = {}
- track['userdata']['filename_ipod'] = track['ipod_path']
+ if track['ipod_path']:
+ track['userdata']['filename_ipod'] = track['ipod_path']
+ hash_name = 'sha1_hash'
try:
- hash_name = 'sha1_hash'
del track['userdata'][hash_name]
except KeyError:
# recent gpod uses sha1_hash, older uses md5_hash
- hash_name = 'md5_hash'
- del track['userdata'][hash_name]
+ try:
+ del track['userdata'][hash_name]
+ hash_name = 'md5_hash'
+ except KeyError:
+ # we'll just write a sha1_hash then
+ pass
if track['userdata'].has_key('filename_locale') and not
track['userdata'].has_key(hash_name):
if os.path.exists(track['userdata']['filename_locale']):
track['userdata'][hash_name] = sha1_hash(
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2