commit 9434f436c7e8947adaf59c1360b043c086291141
Author: Christophe Fergeau <cferg...@mandriva.com>
Date:   Sat Apr 3 19:51:38 2010 +0200

    call itdb_shuffle_write in itdb_write if needed
    
    Until now, library users have to call itdb_shuffle_write by
    themselves when handling an iPod Shuffle. Since libgpod generally
    know when it's handling a Shuffle, it makes sense to do it
    automatically.

 src/itdb_itunesdb.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/src/itdb_itunesdb.c b/src/itdb_itunesdb.c
index c889548..0796df7 100644
--- a/src/itdb_itunesdb.c
+++ b/src/itdb_itunesdb.c
@@ -5806,14 +5806,20 @@ gboolean itdb_write (Itdb_iTunesDB *itdb, GError 
**error)
     g_return_val_if_fail (itdb, FALSE);
     g_return_val_if_fail (itdb_get_mountpoint (itdb), FALSE);
 
+    if (itdb_device_is_shuffle (itdb->device)) {
+        /* iPod Shuffle uses a totally different database */
+        return itdb_shuffle_write (itdb, error);
+    }
+
+
+    /* Now handling regular iPod or iPhone/iPod Touch */
+
     /* First, let's try to write the .ithmb files containing the artwork data
      * since this operation modifies the 'artwork_count' and 'artwork_size' 
      * field in the Itdb_Track contained in the database.
      * Errors happening during that operation are considered non fatal since
      * they shouldn't corrupt the main database.
      */
-
-
     itunes_path = itdb_get_itunes_dir (itdb_get_mountpoint (itdb));
 
     if(!itunes_path)

------------------------------------------------------------------------------
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