summaryrefslogtreecommitdiffstats
path: root/src/itdb_artwork.c
diff options
context:
space:
mode:
authorJorg Schuler <jcsjcs@users.sourceforge.net>2006-05-30 14:09:44 +0000
committerJorg Schuler <jcsjcs@users.sourceforge.net>2006-05-30 14:09:44 +0000
commit4ff7387c3f4eefe1e86e44ad3ae52043770baf1e (patch)
tree64cc40dc42c33925c6183222667354276479c362 /src/itdb_artwork.c
parenteba7d3fff1076914dda819eb8120304f059f4be9 (diff)
downloadlibgpod-4ff7387c3f4eefe1e86e44ad3ae52043770baf1e.tar.gz
libgpod-4ff7387c3f4eefe1e86e44ad3ae52043770baf1e.tar.xz
libgpod-4ff7387c3f4eefe1e86e44ad3ae52043770baf1e.zip
***** merged photo-support branch back to MAIN. branch is tagged
photo-support-merged_00 ipod.py will need minor patching (flag2, flag3). git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1292 f01d2545-417e-4e96-918e-98f8d0dbbcb6
Diffstat (limited to 'src/itdb_artwork.c')
-rw-r--r--src/itdb_artwork.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/itdb_artwork.c b/src/itdb_artwork.c
index 3c7d9d9..7645e35 100644
--- a/src/itdb_artwork.c
+++ b/src/itdb_artwork.c
@@ -1,4 +1,4 @@
-/* Time-stamp: <2006-03-18 01:23:13 jcs>
+/* Time-stamp: <2006-05-26 20:49:27 jcs>
|
| Copyright (C) 2002-2005 Jorg Schuler <jcsjcs at users sourceforge net>
| Part of the gtkpod project.
@@ -64,6 +64,8 @@ void itdb_artwork_free (Itdb_Artwork *artwork)
{
g_return_if_fail (artwork);
itdb_artwork_remove_thumbnails (artwork);
+ if (artwork->userdata && artwork->userdata_destroy)
+ (*artwork->userdata_destroy) (artwork->userdata);
g_free (artwork);
}
@@ -184,7 +186,8 @@ itdb_artwork_add_thumbnail (Itdb_Artwork *artwork,
return FALSE;
}
- artwork->artwork_size = statbuf.st_size;
+ artwork->artwork_size = statbuf.st_size;
+ artwork->creation_date = statbuf.st_mtime;
thumb = itdb_thumb_new ();
thumb->filename = g_strdup (filename);
@@ -259,14 +262,23 @@ gchar *itdb_thumb_get_filename (Itdb_Device *device, Itdb_Thumb *thumb)
g_print (_("Mountpoint not set.\n"));
return NULL;
}
-
artwork_dir = itdb_get_artwork_dir (device->mountpoint);
if (artwork_dir)
{
filename = itdb_get_path (artwork_dir, thumb->filename+1);
g_free (artwork_dir);
}
+ /* FIXME: Hack */
+ if( !filename ) {
+ artwork_dir = itdb_get_photos_thumb_dir (device->mountpoint);
+ if (artwork_dir)
+ {
+ filename = itdb_get_path (artwork_dir, strchr( thumb->filename+1, ':') + 1);
+ g_free (artwork_dir);
+ }
+
+ }
return filename;
}