commit 1232a146e6c03287ca2345823932fbf96e267e8e Author: Christophe Fergeau <cferg...@mandriva.com> Date: Tue Apr 6 15:11:06 2010 +0200
fix iTunesSD writing iTunesSD is to be written *in addition to* iTunesDB, not instead of. Make sure we write both when itdb_shuffle_write is called from itdb_write src/itdb_itunesdb.c | 17 +++++++++++------ 1 files changed, 11 insertions(+), 6 deletions(-) --- diff --git a/src/itdb_itunesdb.c b/src/itdb_itunesdb.c index c1a6571..f163465 100644 --- a/src/itdb_itunesdb.c +++ b/src/itdb_itunesdb.c @@ -5726,6 +5726,9 @@ static gboolean itdb_write_file_internal (Itdb_iTunesDB *itdb, (unsigned char *)fexp->wcontents->contents, fexp->wcontents->pos, &fexp->error); + if (fexp->error) { + goto err; + } if (itdb_device_supports_sqlite_db (itdb->device)) { if (itdb_sqlite_generate_itdbs(fexp) != 0) { @@ -5733,6 +5736,14 @@ static gboolean itdb_write_file_internal (Itdb_iTunesDB *itdb, } } + if (itdb_device_is_shuffle (itdb->device)) { + /* iPod Shuffle uses a simplified database in addition to the + * iTunesDB */ + if (itdb_shuffle_write (itdb, &fexp->error) != 0) { + goto err; + } + } + if (!fexp->error) { if (!wcontents_write (cts)) @@ -5806,12 +5817,6 @@ 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 ------------------------------------------------------------------------------ Download Intel® 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