From da83c8e68edfca1b740b95fe045b5bd32c8ab56d Mon Sep 17 00:00:00 2001 From: jcsjcs Date: Thu, 22 Sep 2005 18:16:50 +0000 Subject: * applied Christophe Fergeau's patch which adds cover art writing support to libgpod -> bump to version 104 git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1098 f01d2545-417e-4e96-918e-98f8d0dbbcb6 --- src/itdb_itunesdb.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/itdb_itunesdb.c') diff --git a/src/itdb_itunesdb.c b/src/itdb_itunesdb.c index 7b034ee..e8eacc3 100644 --- a/src/itdb_itunesdb.c +++ b/src/itdb_itunesdb.c @@ -898,6 +898,7 @@ Itdb_iTunesDB *itdb_new (void) itdb->version = 0x09; itdb->id = ((guint64)g_rand_int (grand) << 32) | ((guint64)g_rand_int (grand)); + g_rand_free (grand); return itdb; } @@ -3301,6 +3302,14 @@ gboolean itdb_write (Itdb_iTunesDB *itdb, const gchar *mp, GError **error) if (!mp) mp = itdb->mountpoint; + /* 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. + */ + ipod_write_artwork_db (itdb, mp); + itunes_path = itdb_resolve_path (mp, db); if(!itunes_path) -- cgit