diff options
author | Christophe Fergeau <teuf@gnome.org> | 2007-10-05 19:13:37 +0000 |
---|---|---|
committer | Christophe Fergeau <teuf@gnome.org> | 2007-10-05 19:13:37 +0000 |
commit | 076840a3bbc48a236ce75a5d6ddafe0987907469 (patch) | |
tree | 8977a1a54b53a94e2624d0afab99b4b0f70d409c | |
parent | b6d697333b04258a9fbd3c4c5471eef2586979bc (diff) | |
download | libgpod-tmz-076840a3bbc48a236ce75a5d6ddafe0987907469.tar.gz libgpod-tmz-076840a3bbc48a236ce75a5d6ddafe0987907469.tar.xz libgpod-tmz-076840a3bbc48a236ce75a5d6ddafe0987907469.zip |
* src/itdb_itunesdb.c: (itdb_write_file): set Itdb_Track::id
before writing the artwork since artwork writing uses them
git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1717 f01d2545-417e-4e96-918e-98f8d0dbbcb6
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/itdb_itunesdb.c | 22 |
2 files changed, 18 insertions, 9 deletions
@@ -1,3 +1,8 @@ +2007-10-05 Christophe Fergeau <teuf@gnome.org> + + * src/itdb_itunesdb.c: (itdb_write_file): set Itdb_Track::id + before writing the artwork since artwork writing uses them + 2007-10-01 Christophe Fergeau <teuf@gnome.org> * README.SysInfo: add explanations about how the iPod needs to be diff --git a/src/itdb_itunesdb.c b/src/itdb_itunesdb.c index debf657..360e27d 100644 --- a/src/itdb_itunesdb.c +++ b/src/itdb_itunesdb.c @@ -4931,25 +4931,29 @@ gboolean itdb_write_file (Itdb_iTunesDB *itdb, const gchar *filename, if (!itdb->device->byte_order) itdb_device_autodetect_endianess (itdb->device); + fexp = g_new0 (FExport, 1); + fexp->itdb = itdb; + fexp->wcontents = wcontents_new (filename); + cts = fexp->wcontents; + + cts->reversed = (itdb->device->byte_order == G_BIG_ENDIAN); + + prepare_itdb_for_write (fexp); + #if HAVE_GDKPIXBUF /* only write ArtworkDB if we deal with an iPod FIXME: figure out a way to store the artwork data when storing to local directories. At the moment it's the application's task to handle this. */ + /* The ArtworkDB must be written after the call to + * prepare_itdb_for_write since it needs Itdb_Track::id to be set + * to its final value to write properly on nano video/ipod classics + */ if (itdb_device_supports_artwork (itdb->device)) { ipod_write_artwork_db (itdb); } #endif - fexp = g_new0 (FExport, 1); - fexp->itdb = itdb; - fexp->wcontents = wcontents_new (filename); - cts = fexp->wcontents; - - cts->reversed = (itdb->device->byte_order == G_BIG_ENDIAN); - - prepare_itdb_for_write (fexp); - mk_mhbd (fexp, 3); /* three mhsds */ /* write tracklist */ if (write_mhsd_tracks (fexp)) |