summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--src/itdb_itunesdb.c22
2 files changed, 18 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index 1da0c97..971ebb3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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))