commit 0c62a56dd9a840c56cfbb5d9070bf3c97c4ac3ab
Author: Adrian Sampson <asamp...@trystero.(none)>
Date:   Fri Apr 2 21:15:34 2010 -0700

    attempt at fixing errors when writing iPhone-family database from python
    
    Switched the Python bindings to use itdb_write instead of itdb_write_file
    and to more intelligently get the path to the database. As a side effect,
    however, we no longer throw an error when failing to write a shuffle
    database.

 bindings/python/ipod.py |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/bindings/python/ipod.py b/bindings/python/ipod.py
index 8853d01..66fd93b 100644
--- a/bindings/python/ipod.py
+++ b/bindings/python/ipod.py
@@ -80,8 +80,9 @@ class Database:
                 raise DatabaseException("Unable to parse iTunes database at 
mount point %s" % mountpoint)
             else:
                 self._itdb.mountpoint = mountpoint
-            self._itdb_file    = os.path.join(self._itdb.mountpoint,
-                                              
"iPod_Control","iTunes","iTunesDB")
+            self._itdb_file = gpod.itdb_get_itunesdb_path(
+                                gpod.itdb_get_mountpoint(self._itdb)
+                              )
         self._load_gtkpod_extended_info()
 
     def __str__(self):
@@ -109,11 +110,8 @@ class Database:
 
         """
 
-        if not gpod.itdb_write_file(self._itdb, self._itdb_file, None):
+        if not gpod.itdb_write(self._itdb, None):
             raise DatabaseException("Unable to save iTunes database %s" % self)
-        if gpod.itdb_get_mountpoint(self._itdb):
-            if not gpod.itdb_shuffle_write(self._itdb, None):
-                raise DatabaseException("Unable to save shuffle database on 
%s" % self._itdb.mountpoint)
         itdbext_file = "%s.ext" % (self._itdb_file)
         gtkpod.write(itdbext_file, self, self._itdb_file)
 

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
gtkpod-cvs2 mailing list
gtkpod-cvs2@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2

Reply via email to