summaryrefslogtreecommitdiffstats
path: root/src/db-artwork-writer.c
diff options
context:
space:
mode:
authorChristophe Fergeau <teuf@gnome.org>2005-09-27 07:25:25 +0000
committerChristophe Fergeau <teuf@gnome.org>2005-09-27 07:25:25 +0000
commitd6dec038c4b1080024184298558e54df7fd10b70 (patch)
tree9b7b473b8e72733ac29a6e6bd7d68f140c55f442 /src/db-artwork-writer.c
parent559b5a64f3681fa6f1ee117df982b419ac742fd5 (diff)
downloadlibgpod-tmz-d6dec038c4b1080024184298558e54df7fd10b70.tar.gz
libgpod-tmz-d6dec038c4b1080024184298558e54df7fd10b70.tar.xz
libgpod-tmz-d6dec038c4b1080024184298558e54df7fd10b70.zip
2005-09-27 Christophe Fergeau <teuf@gnome.org>
* src/itdb_itunesdb.c: (write_mhsd_tracks), (write_playlist_mhips), (write_podcast_mhips): move variable declaration before code to fix compilation * src/db-artwork-parser.c: (ipod_parse_artwork_db): * src/db-artwork-writer.c: (ipod_write_artwork_db): * src/ithumb-writer.c: (ithumb_writer_new): added some sanity checks git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1103 f01d2545-417e-4e96-918e-98f8d0dbbcb6
Diffstat (limited to 'src/db-artwork-writer.c')
-rw-r--r--src/db-artwork-writer.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/db-artwork-writer.c b/src/db-artwork-writer.c
index cb97b7a..c87bffa 100644
--- a/src/db-artwork-writer.c
+++ b/src/db-artwork-writer.c
@@ -730,11 +730,18 @@ ipod_write_artwork_db (Itdb_iTunesDB *db, const char *mount_point)
* 'artwork_size' fields, as well as the 2 Itdb_Image fields
*/
itdb_write_ithumb_files (db, mount_point);
- g_print ("%s\n", G_GNUC_FUNCTION);
/* Now we can update the ArtworkDB file */
id_max = ipod_artwork_db_set_ids (db);
+ /* FIXME: need to create the file if it doesn't exist */
filename = ipod_db_get_artwork_db_path (mount_point);
+ if (filename == NULL) {
+ /* FIXME: the iTunesDB will be inconsistent wrt artwork_count
+ * it might be better to 0 out this field in all tracks
+ * when we encounter an error
+ */
+ return -1;
+ }
buf = ipod_buffer_new (filename);
if (buf == NULL) {
g_print ("Couldn't create %s\n", filename);