summaryrefslogtreecommitdiffstats
path: root/src/db-artwork-writer.c
diff options
context:
space:
mode:
authorjcsjcs <jcsjcs@f01d2545-417e-4e96-918e-98f8d0dbbcb6>2005-11-24 13:31:24 +0000
committerjcsjcs <jcsjcs@f01d2545-417e-4e96-918e-98f8d0dbbcb6>2005-11-24 13:31:24 +0000
commit9fa0f0a3350cf861663e175147ee37e44a4df412 (patch)
treea81674e47ced1e16abdd14dce1bb1a792f6ce9bc /src/db-artwork-writer.c
parent20b73f87a4b4ddbfcfeafb97c5b6106bde2b0a19 (diff)
* overall changes to support itdb_image_get_gdk_pixbuf(). Run
"tests/test-thumbnails <ipod_mount> to copy all thumbnails into the current directory. git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1172 f01d2545-417e-4e96-918e-98f8d0dbbcb6
Diffstat (limited to 'src/db-artwork-writer.c')
-rw-r--r--src/db-artwork-writer.c30
1 files changed, 3 insertions, 27 deletions
diff --git a/src/db-artwork-writer.c b/src/db-artwork-writer.c
index 33e673c..9a6924c 100644
--- a/src/db-artwork-writer.c
+++ b/src/db-artwork-writer.c
@@ -241,31 +241,6 @@ enum iPodThumbnailType {
#define RETURN_SIZE_FOR(id, size) if (strncmp (id, header_id, 4) == 0) return (size)
-static const IpodArtworkFormat *
-get_artwork_info (IpodDevice *ipod, int image_type)
-{
- const IpodArtworkFormat *formats;
-
- if (ipod == NULL) {
- return NULL;
- }
-
- g_object_get (G_OBJECT (ipod), "artwork-formats", &formats, NULL);
- if (formats == NULL) {
- return NULL;
- }
-
- while ((formats->type != -1) && (formats->type != image_type)) {
- formats++;
- }
-
- if (formats->type == -1) {
- return NULL;
- }
-
- return formats;
-}
-
/* Returns the "real" size for a header, ie the size iTunes uses for it
* (padding included)
@@ -477,7 +452,8 @@ write_mhii (Itdb_Track *song, iPodBuffer *buffer)
return -1;
}
thumb = (Itdb_Image *)it->data;
- img_info = get_artwork_info (song->itdb->device, thumb->type);
+ img_info = ipod_get_artwork_info_from_type (
+ song->itdb->device, thumb->type);
if (img_info == NULL) {
return -1;
}
@@ -571,7 +547,7 @@ write_mhif (Itdb_iTunesDB *db, iPodBuffer *buffer, enum iPodThumbnailType type)
}
mhif->total_len = mhif->header_len;
- img_info = get_artwork_info (db->device, type);
+ img_info = ipod_get_artwork_info_from_type (db->device, type);
if (img_info == NULL) {
return -1;
}