diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test-covers.c | 24 | ||||
-rw-r--r-- | tests/test-write-covers.c | 4 |
2 files changed, 14 insertions, 14 deletions
diff --git a/tests/test-covers.c b/tests/test-covers.c index 5816ce2..0a79cff 100644 --- a/tests/test-covers.c +++ b/tests/test-covers.c @@ -33,14 +33,14 @@ static void -save_itdb_image (Itdb_iTunesDB *itdb, Itdb_Image *image, const char *filename) +save_itdb_thumb (Itdb_iTunesDB *itdb, Itdb_Thumb *thumb, const char *filename) { - GdkPixbuf *thumb; + GdkPixbuf *pixbuf; - thumb = itdb_image_get_gdk_pixbuf (itdb, image); - if (thumb != NULL) { - gdk_pixbuf_save (thumb, filename, "png", NULL, NULL); - gdk_pixbuf_unref (thumb); + pixbuf = itdb_thumb_get_gdk_pixbuf (itdb->device, thumb); + if (pixbuf != NULL) { + gdk_pixbuf_save (pixbuf, filename, "png", NULL, NULL); + gdk_pixbuf_unref (pixbuf); /* g_print ("Saved %s\n", filename); */ } } @@ -49,20 +49,20 @@ save_song_thumbnails (Itdb_Track *song) { GList *it; - for (it = song->thumbnails; it != NULL; it = it->next) { - Itdb_Image *image; + for (it = song->artwork->thumbnails; it != NULL; it = it->next) { + Itdb_Thumb *thumb; gchar *filename; - image = (Itdb_Image *)it->data; - g_return_if_fail (image); + thumb = (Itdb_Thumb *)it->data; + g_return_if_fail (thumb); filename = NULL; filename = g_strdup_printf ("%s-%s-%s-%d-%016"G_GINT64_MODIFIER"x.png", song->artist, song->album, - song->title, image->type, + song->title, thumb->type, song->dbid); if (filename != NULL) { - save_itdb_image (song->itdb, image, filename); + save_itdb_thumb (song->itdb, thumb, filename); g_free (filename); } } diff --git a/tests/test-write-covers.c b/tests/test-write-covers.c index 88c0216..dab7fc0 100644 --- a/tests/test-write-covers.c +++ b/tests/test-write-covers.c @@ -97,11 +97,11 @@ main (int argc, char **argv) const char *coverpath; song = (Itdb_Track*)it->data; - itdb_track_remove_thumbnail (song); + itdb_artwork_remove_thumbnails (song->artwork); coverpath = g_list_nth_data (covers, g_random_int_range (0, nb_covers)); - itdb_track_set_thumbnail (song, coverpath); + itdb_track_set_thumbnails (song, coverpath); /* g_print ("%s - %s - %s gets %s\n", song->artist, song->album, song->title, coverpath);*/ |