summaryrefslogtreecommitdiffstats
path: root/src/db-artwork-parser.c
diff options
context:
space:
mode:
authorteuf <teuf@f01d2545-417e-4e96-918e-98f8d0dbbcb6>2008-06-09 19:53:36 +0000
committerteuf <teuf@f01d2545-417e-4e96-918e-98f8d0dbbcb6>2008-06-09 19:53:36 +0000
commit1d8f0569e5d779a14a590d33cc4aa45db5d8049b (patch)
tree1261fe601c0fdc543ca024404b6107245d3d4ead /src/db-artwork-parser.c
parent55a3a23ffca6d6228e83ad69cbfbfca765023c41 (diff)
downloadlibgpod-1d8f0569e5d779a14a590d33cc4aa45db5d8049b.tar.gz
libgpod-1d8f0569e5d779a14a590d33cc4aa45db5d8049b.tar.xz
libgpod-1d8f0569e5d779a14a590d33cc4aa45db5d8049b.zip
* src/db-artwork-parser.c: remove duplicated artwork/photo support
testing functions * src/db-artwork-parser.h: ditto * src/itdb_itunesdb.c: s/ipod_supports_XXX/itdb_device_supports_XXX * src/itdb_photoalbum.c: ditto * src/itdb.h: use a const Itdb_Device argument for itdb_device_supports_*, add ITDB_IPOD_GENERATION_IPHONE_1 to Itdb_IpodGeneration, get rid of ITDB_IPOD_GENERATION_FIFTH and ITDB_IPOD_GENERATION_SIXTH * src/itdb_device.c: split functions to get artwork format from the ipod in 2 separate functions: instead of itdb_device_get_artwork_formats we now have itdb_device_get_photo_formats and itdb_device_get_cover_art_formats * src/itdb_device.h: * src/db-image-parser.c: use the separate get_cover_art_formats/get_photos_formats functions * src/db-artwork-writer.c: ditto * src/ithumb-writer.c: ditto git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@2009 f01d2545-417e-4e96-918e-98f8d0dbbcb6
Diffstat (limited to 'src/db-artwork-parser.c')
-rw-r--r--src/db-artwork-parser.c85
1 files changed, 1 insertions, 84 deletions
diff --git a/src/db-artwork-parser.c b/src/db-artwork-parser.c
index 938dbef..1f4f84b 100644
--- a/src/db-artwork-parser.c
+++ b/src/db-artwork-parser.c
@@ -672,89 +672,6 @@ ipod_db_get_artwork_db_path (const char *mount_point)
return filename;
}
-G_GNUC_INTERNAL gboolean
-ipod_supports_cover_art (Itdb_Device *device)
-{
- const Itdb_ArtworkFormat *formats;
-
- if (device == NULL) {
- return FALSE;
- }
-
- formats = itdb_device_get_artwork_formats (device);
- if (formats == NULL) {
- return FALSE;
- }
-
- while (formats->type != -1)
- {
- switch (formats->type)
- {
- case ITDB_THUMB_COVER_SMALL:
- case ITDB_THUMB_COVER_LARGE:
- return TRUE;
- case ITDB_THUMB_PHOTO_SMALL:
- case ITDB_THUMB_PHOTO_LARGE:
- case ITDB_THUMB_PHOTO_FULL_SCREEN:
- case ITDB_THUMB_PHOTO_TV_SCREEN:
- break;
- case ITDB_THUMB_COVER_XLARGE:
- case ITDB_THUMB_COVER_MEDIUM:
- case ITDB_THUMB_COVER_SMEDIUM:
- case ITDB_THUMB_COVER_XSMALL:
- break;
- case ITDB_THUMB_CHAPTER_SMALL:
- case ITDB_THUMB_CHAPTER_LARGE:
- break;
- }
- formats++;
- }
-
- return FALSE;
-}
-
-G_GNUC_INTERNAL gboolean
-ipod_supports_photos (Itdb_Device *device)
-{
- const Itdb_ArtworkFormat *formats;
-
- if (device == NULL) {
- return FALSE;
- }
-
- formats = itdb_device_get_artwork_formats (device);
- if (formats == NULL) {
- return FALSE;
- }
-
- while (formats->type != -1)
- {
- switch (formats->type)
- {
- case ITDB_THUMB_COVER_SMALL:
- case ITDB_THUMB_COVER_LARGE:
- break;
- case ITDB_THUMB_PHOTO_SMALL:
- case ITDB_THUMB_PHOTO_LARGE:
- case ITDB_THUMB_PHOTO_FULL_SCREEN:
- case ITDB_THUMB_PHOTO_TV_SCREEN:
- return TRUE;
- case ITDB_THUMB_COVER_XLARGE:
- case ITDB_THUMB_COVER_MEDIUM:
- case ITDB_THUMB_COVER_SMEDIUM:
- case ITDB_THUMB_COVER_XSMALL:
- break;
- case ITDB_THUMB_CHAPTER_SMALL:
- case ITDB_THUMB_CHAPTER_LARGE:
- break;
- }
- formats++;
- }
-
- return FALSE;
-}
-
-
int
ipod_parse_artwork_db (Itdb_iTunesDB *itdb)
{
@@ -767,7 +684,7 @@ ipod_parse_artwork_db (Itdb_iTunesDB *itdb)
g_return_val_if_fail (itdb, -1);
- if (!ipod_supports_cover_art (itdb->device)) {
+ if (!itdb_device_supports_artwork (itdb->device)) {
return -1;
}
ctx = NULL;