diff -urN amarok-2.0.1.1.old/cmake/modules/FindIpod.cmake amarok-2.0.1.1/cmake/modules/FindIpod.cmake --- amarok-2.0.1.1.old/cmake/modules/FindIpod.cmake 2009-01-06 13:48:28.000000000 +0100 +++ amarok-2.0.1.1/cmake/modules/FindIpod.cmake 2009-02-10 18:18:23.000000000 +0100 @@ -2,45 +2,35 @@ # Once done this will define # # IPOD_FOUND - system has libgpod -# IPOD_INCLUDE_DIR - the libgpod include directory +# IPOD_INCLUDE_DIRS - the libgpod include directory # IPOD_LIBRARIES - Link these to use libgpod -# IPOD_DEFINITIONS - Compiler switches required for using libgpod +# IPOD_CFLAGS - Compiler switches required for using libgpod +# IPOD_VERSION - Version number of libgpod # -if (IPOD_INCLUDE_DIR AND IPOD_LIBRARIES) +if (IPOD_INCLUDE_DIRS AND IPOD_LIBRARIES) # in cache already SET(IPOD_FOUND TRUE) -else (IPOD_INCLUDE_DIR AND IPOD_LIBRARIES) +else (IPOD_INCLUDE_DIRS AND IPOD_LIBRARIES) if(NOT WIN32) # use pkg-config to get the directories and then use these values # in the FIND_PATH() and FIND_LIBRARY() calls - INCLUDE(UsePkgConfig) - - PKGCONFIG(libgpod-1.0 _IPODIncDir _IPODLinkDir _IPODLinkFlags _IPODCflags) - - set(IPOD_DEFINITIONS ${_IPODCflags}) + find_package(PkgConfig) + PKG_SEARCH_MODULE(IPOD libgpod-1.0) + endif(NOT WIN32) + IF (IPOD_FOUND) + IF (NOT IPOD_FIND_QUIETLY) + MESSAGE(STATUS "Found libgpod-1 ${IPOD_VERSION}") + ENDIF (NOT IPOD_FIND_QUIETLY) + ELSE (IPOD_FOUND) + IF (IPOD_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "Could NOT find libgpod-1, check FindPkgConfig output above!") + ENDIF (IPOD_FIND_REQUIRED) + ENDIF (IPOD_FOUND) + + MARK_AS_ADVANCED(IPOD_INCLUDE_DIRS) - FIND_PATH(IPOD_INCLUDE_DIR gpod/itdb.h /usr/include/gpod-1.0 - ${_IPODIncDir} - ) - - FIND_LIBRARY(IPOD_LIBRARIES NAMES gpod - PATHS - ${_IPODLinkDir} - ) - - if (IPOD_INCLUDE_DIR AND IPOD_LIBRARIES) - SET(IPOD_FOUND TRUE) - else (IPOD_INCLUDE_DIR AND IPOD_LIBRARIES) - SET(IPOD_FOUND_FALSE) - endif (IPOD_INCLUDE_DIR AND IPOD_LIBRARIES) - - include(FindPackageHandleStandardArgs) - FIND_PACKAGE_HANDLE_STANDARD_ARGS(Ipod DEFAULT_MSG IPOD_INCLUDE_DIR IPOD_LIBRARIES ) - - MARK_AS_ADVANCED(IPOD_INCLUDE_DIR IPOD_LIBRARIES) - -endif (IPOD_INCLUDE_DIR AND IPOD_LIBRARIES) +endif (IPOD_INCLUDE_DIRS AND IPOD_LIBRARIES) diff -urN amarok-2.0.1.1.old/CMakeLists.txt amarok-2.0.1.1/CMakeLists.txt --- amarok-2.0.1.1.old/CMakeLists.txt 2009-01-06 14:12:50.000000000 +0100 +++ amarok-2.0.1.1/CMakeLists.txt 2009-02-10 18:22:23.000000000 +0100 @@ -56,7 +56,10 @@ 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" "" ) +if(IPOD_FOUND) + macro_ensure_version("0.7.0" ${IPOD_VERSION} IPOD_0_7) +endif(IPOD_FOUND) +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" "" ) diff -urN amarok-2.0.1.1.old/src/collection/ipodcollection/CMakeLists.txt amarok-2.0.1.1/src/collection/ipodcollection/CMakeLists.txt --- amarok-2.0.1.1.old/src/collection/ipodcollection/CMakeLists.txt 2009-01-06 13:49:32.000000000 +0100 +++ amarok-2.0.1.1/src/collection/ipodcollection/CMakeLists.txt 2009-02-10 22:22:01.000000000 +0100 @@ -17,7 +17,7 @@ handler ${GLIB2_INCLUDE_DIR} ${GDK_INCLUDE_DIR} - ${IPOD_INCLUDE_DIR} + ${IPOD_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR}/../.. ${AMAROK_COLLECTION_SUPPORT_DIR} ${KDE4_INCLUDE_DIR} diff -urN amarok-2.0.1.1.old/src/collection/ipodcollection/handler/IpodHandler.cpp amarok-2.0.1.1/src/collection/ipodcollection/handler/IpodHandler.cpp --- amarok-2.0.1.1.old/src/collection/ipodcollection/handler/IpodHandler.cpp 2009-01-06 13:49:32.000000000 +0100 +++ amarok-2.0.1.1/src/collection/ipodcollection/handler/IpodHandler.cpp 2009-02-10 18:00:09.000000000 +0100 @@ -1339,73 +1339,12 @@ 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 - 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 ); - } - } - } + if( ipodtrack->has_artwork == 0x01 ) // 0x01 = true ; 0x02 = false + gpixbuf = (GdkPixbuf*) itdb_artwork_get_pixbuf( m_device, ipodtrack->artwork, 50, 50 ); if(gpixbuf != NULL) {