Revision: 1579
          http://gtkpod.svn.sourceforge.net/gtkpod/?rev=1579&view=rev
Author:   jcsjcs
Date:     2007-06-22 20:54:37 -0700 (Fri, 22 Jun 2007)

Log Message:
-----------
        * src/display_coverart.c (coverart_get_track_thumb): retrieve
          thumbnail through libgpod and not from thumbnail filenames
          because these are not always set.

Modified Paths:
--------------
    gtkpod/trunk/ChangeLog_detailed
    gtkpod/trunk/src/display_coverart.c

Modified: gtkpod/trunk/ChangeLog_detailed
===================================================================
--- gtkpod/trunk/ChangeLog_detailed     2007-06-23 02:12:34 UTC (rev 1578)
+++ gtkpod/trunk/ChangeLog_detailed     2007-06-23 03:54:37 UTC (rev 1579)
@@ -5,6 +5,10 @@
        * src/misc_conversion.c: corrected tooltip for BPM (thanks to
          Danielle Forsi).
 
+       * src/display_coverart.c (coverart_get_track_thumb): retrieve
+         thumbnail through libgpod and not from thumbnail filenames
+         because these are not always set.
+
 2007-06-22 Jorg Schuler <jcsjcs at users.sourceforge.net>
 
        * src/mp3file.c:

Modified: gtkpod/trunk/src/display_coverart.c
===================================================================
--- gtkpod/trunk/src/display_coverart.c 2007-06-23 02:12:34 UTC (rev 1578)
+++ gtkpod/trunk/src/display_coverart.c 2007-06-23 03:54:37 UTC (rev 1579)
@@ -653,26 +653,19 @@
 GdkPixbuf *coverart_get_track_thumb (Track *track, Itdb_Device *device)
 {
        GdkPixbuf *pixbuf = NULL;       
+       Thumb *thumb;
        ExtraTrackData *etd;
-       
+
        etd = track->userdata;
-       if (etd && etd->thumb_path_locale)
+       g_return_val_if_fail (etd, NULL);
+
+       thumb = itdb_artwork_get_thumb_by_type (track->artwork,
+                                               ITDB_THUMB_COVER_LARGE);
+       if (thumb)
        {
-               GError *error = NULL;
-               pixbuf = gdk_pixbuf_new_from_file (etd->thumb_path_locale, 
&error);
-               if (error != NULL)
-               {
-                       /*
-                       printf("Error occurred loading the image file - \nCode: 
%d\nMessage: %s\n", error->code, error->message);
-                       */
-                       g_error_free (error);
-               }
+           pixbuf = itdb_thumb_get_gdk_pixbuf (device, thumb);
        }
        
-       /* Either thumb was null or the attempt at getting a pixbuf failed
-        * due to invalid file. For example, some nut (like me) decided to
-        * apply an mp3 file to the track as its cover file
-        */
        if (pixbuf ==  NULL)
        {
                /* Could not get a viable thumbnail so get default pixbuf */


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2

Reply via email to