extragear/multimedia/amarok
Alejandro Daniel Wainzinger
aikawarazuni at gmail.com
Sat Jan 24 20:46:37 CET 2009
SVN commit 916188 by awainzinger:
libgpod 0.7.0? Yes we can! Notes:
- libgpod 0.6.0 will likely not compile with this, go upgrade to 0.7.0 final
- image size specified to libgpod generates strange gtk-related warnings at runtime, ignore them, showing artwork works
- setting artwork is still disabled, will get to this eventually
- CMake still not testing for version, since I still can't figure out how to make it do that and have it work right
BUG:178054
CCMAIL: amarok-devel at kde.org
M +1 -1 CMakeLists.txt
M +3 -60 src/collection/ipodcollection/handler/IpodHandler.cpp
--- trunk/extragear/multimedia/amarok/CMakeLists.txt #916187:916188
@@ -56,7 +56,7 @@
macro_log_feature( GDK_FOUND "Gdk" "Support for artwork on iPod audio devices via GdkPixbuf" "http://developer.gnome.org/arch/imaging/gdkpixbuf.html" FALSE "2.0.x" "" )
macro_optional_find_package(Ipod)
-macro_log_feature( IPOD_FOUND "libgpod" "Support Apple iPod audio devices" "http://sourceforge.net/projects/gtkpod/" FALSE "0.6.0" "" )
+macro_log_feature( IPOD_FOUND "libgpod" "Support Apple iPod audio devices" "http://sourceforge.net/projects/gtkpod/" FALSE "0.7.0" "" )
#macro_optional_find_package(MySQL)
#macro_log_feature( MYSQL_FOUND "mysql" "Store Collection in a mysql database instead of a sqlite one" "http://www.mysql.com" FALSE "4.1.0" "" )
--- trunk/extragear/multimedia/amarok/src/collection/ipodcollection/handler/IpodHandler.cpp #916187:916188
@@ -1339,72 +1339,15 @@
QFileInfo tempImageFileInfo( tempImageFile ); // get info for path
QString tempImagePath = tempImageFileInfo.absoluteFilePath(); // path
- Itdb_Thumb *thumb = NULL;
GdkPixbuf *gpixbuf = NULL;
- QString thumbPath;
// pull image out of ipod
+ // NOTE: 0x01 = has, 0x02 = has not
+
if( ipodtrack->has_artwork == 0x01 )
{
- // try small first
-
- thumb = itdb_artwork_get_thumb_by_type ( ipodtrack->artwork, ITDB_THUMB_COVER_SMALL );
-
- // then large if needed
- if( thumb == NULL)
- {
- thumb = itdb_artwork_get_thumb_by_type ( ipodtrack->artwork, ITDB_THUMB_COVER_LARGE );
- }
-
- if( thumb != NULL)
- {
- gpixbuf = (GdkPixbuf*) itdb_thumb_get_gdk_pixbuf( m_device, thumb );
- }
- else
- {
- GList *thumbs = ipodtrack->artwork->thumbnails;
-
- for(; thumbs; thumbs = thumbs->next)
- {
- Itdb_Thumb *curThumb = ( Itdb_Thumb * )thumbs->data;
- if( curThumb == NULL)
- continue;
-
- switch( curThumb->type )
- {
- case ITDB_THUMB_PHOTO_SMALL:
- break;
- case ITDB_THUMB_PHOTO_LARGE:
- break;
- case ITDB_THUMB_PHOTO_FULL_SCREEN:
- break;
- case ITDB_THUMB_PHOTO_TV_SCREEN:
- break;
- case ITDB_THUMB_COVER_XLARGE:
- break;
- case ITDB_THUMB_COVER_MEDIUM:
- break;
- case ITDB_THUMB_COVER_SMEDIUM:
- break;
- case ITDB_THUMB_COVER_XSMALL:
- break;
-
- default:
- break;
- }
-
- thumb = curThumb;
- break;
-
- }
-
- if( thumb != NULL)
- {
- thumbPath = QString::fromUtf8( itdb_thumb_get_filename( m_device, thumb ) );
- gpixbuf = (GdkPixbuf*) itdb_thumb_get_gdk_pixbuf( m_device, thumb );
- }
- }
+ gpixbuf = (GdkPixbuf*) itdb_artwork_get_pixbuf( m_device, ipodtrack->artwork, 50, 50 );
}
if(gpixbuf != NULL)
More information about the Amarok-devel
mailing list