rpms/amarok/F-10 amarok-2.0.96-old-libgpod.patch, 1.1, 1.2 amarok.spec, 1.140, 1.141

Kevin Kofler kkofler at fedoraproject.org
Tue May 26 21:48:21 UTC 2009


Author: kkofler

Update of /cvs/pkgs/rpms/amarok/F-10
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv16207/F-10

Modified Files:
	amarok-2.0.96-old-libgpod.patch amarok.spec 
Log Message:
Resurrect some code from 2.0.2 to replace itdb_artwork_get_pixbuf function (unavailable in libgpod 0.6).

amarok-2.0.96-old-libgpod.patch:

Index: amarok-2.0.96-old-libgpod.patch
===================================================================
RCS file: /cvs/pkgs/rpms/amarok/F-10/amarok-2.0.96-old-libgpod.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- amarok-2.0.96-old-libgpod.patch	26 May 2009 21:27:00 -0000	1.1
+++ amarok-2.0.96-old-libgpod.patch	26 May 2009 21:47:50 -0000	1.2
@@ -31,3 +31,74 @@ diff -ur amarok-2.0.96/src/collection/ip
          ${SERVICES_INSTALL_DIR})
 -endif (IPOD_FOUND AND IPOD_0_7 AND WITH_Ipod)
 +endif (IPOD_FOUND AND WITH_Ipod)
+diff -ur amarok-2.0.96/src/collection/ipodcollection/handler/IpodHandler.cpp amarok-2.0.96-old-libgpod/src/collection/ipodcollection/handler/IpodHandler.cpp
+--- amarok-2.0.96/src/collection/ipodcollection/handler/IpodHandler.cpp	2009-05-26 23:22:01.000000000 +0200
++++ amarok-2.0.96-old-libgpod/src/collection/ipodcollection/handler/IpodHandler.cpp	2009-05-26 23:44:50.000000000 +0200
+@@ -1299,7 +1299,66 @@
+     if( ipodtrack->has_artwork == 0x02 )
+         return;
+ 
+-    GdkPixbuf *pixbuf = (GdkPixbuf*) itdb_artwork_get_pixbuf( ipodtrack->itdb->device, ipodtrack->artwork, -1, -1 );
++    GdkPixbuf *pixbuf = NULL;
++
++    // 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)
++    {
++        pixbuf = (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 ) );
++            pixbuf = (GdkPixbuf*) itdb_thumb_get_gdk_pixbuf( m_device, thumb );
++        }
++    }
++
+     if( !pixbuf )
+         return;
+ 


Index: amarok.spec
===================================================================
RCS file: /cvs/pkgs/rpms/amarok/F-10/amarok.spec,v
retrieving revision 1.140
retrieving revision 1.141
diff -u -p -r1.140 -r1.141
--- amarok.spec	26 May 2009 21:27:00 -0000	1.140
+++ amarok.spec	26 May 2009 21:47:50 -0000	1.141
@@ -15,6 +15,8 @@ Url:     http://amarok.kde.org/
 Source0: http://download.kde.org/unstable/amarok/%{version}/src/amarok-%{version}.tar.bz2
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
+# This basically reverts http://websvn.kde.org/?view=rev&revision=916188
+# (replaces itdb_artwork_get_pixbuf (new in 0.7) by the old code from 2.0.2).
 Patch0:  amarok-2.0.96-old-libgpod.patch
 Patch50: amarok-2.0.90-qtscript_not_required.patch
 




More information about the fedora-extras-commits mailing list