Hello community,

here is the log from the commit of package amarok for openSUSE:Factory checked 
in at 2016-04-17 22:17:14
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/amarok (Old)
 and      /work/SRC/openSUSE:Factory/.amarok.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "amarok"

Changes:
--------
--- /work/SRC/openSUSE:Factory/amarok/amarok.changes    2016-03-02 
14:21:13.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.amarok.new/amarok.changes       2016-04-17 
22:17:21.000000000 +0200
@@ -1,0 +2,12 @@
+Tue Apr 12 21:36:08 UTC 2016 - [email protected]
+
+- Copy download icon from Breeze on Leap 42.1 and Tumbleweed
+
+-------------------------------------------------------------------
+Sat Apr  9 15:04:41 UTC 2016 - [email protected]
+
+- Add Fix-for-infinite-loop-with-some-Audio-CDs.patch to fix the
+  infinite loop in case a home-burned or old audio CD (without
+  CDTEXT) is inserted (kde#339190)
+
+-------------------------------------------------------------------

New:
----
  Fix-for-infinite-loop-with-some-Audio-CDs.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ amarok.spec ++++++
--- /var/tmp/diff_new_pack.Q7zi77/_old  2016-04-17 22:17:23.000000000 +0200
+++ /var/tmp/diff_new_pack.Q7zi77/_new  2016-04-17 22:17:23.000000000 +0200
@@ -57,6 +57,8 @@
 # PATCH-FIX-UPSTREAM Enable_Wikipedia_over_SSL.patch boo#934730, kde#349313 - 
Unbreak Wikipedia applet by enabling SSL
 Patch109:       Enable_Wikipedia_over_SSL.patch
 Patch110:       amarok-ffmpeg3.0.patch
+# PATCH-FIX-UPSTREAM Fix-for-infinite-loop-with-some-Audio-CDs.patch 
kde#339190 -- Fix for the infinite loop in case a home-burned or old audio CD 
is inserted
+Patch111:       Fix-for-infinite-loop-with-some-Audio-CDs.patch
 # Required for the fdupes macro
 BuildRequires:  fdupes
 BuildRequires:  gdk-pixbuf-devel
@@ -76,7 +78,11 @@
 BuildRequires:  libqt4-devel >= 4.8.2
 BuildRequires:  libxml2-devel
 BuildRequires:  loudmouth-devel
+%if 0%{?is_opensuse}
+BuildRequires:  breeze5-icons
+%else
 BuildRequires:  oxygen-icon-theme
+%endif
 BuildRequires:  qt4-qtscript
 BuildRequires:  taglib
 BuildRequires:  taglib-devel >= 1.7
@@ -124,6 +130,7 @@
 %patch108 -p1
 %patch109 -p1
 %patch110 -p0
+%patch111 -p1
 
 # Remove build time references so build-compare can do its work
 FAKE_BUILDDATE=$(LC_ALL=C date -u -r %{SOURCE99} '+%%b %%e %%Y')
@@ -146,12 +153,21 @@
 #bnc722284 amarok is not really a good player for audio-cds, remove the action 
for solid
 rm -f %{buildroot}%{_kde4_appsdir}/solid/actions/amarok-play-audiocd.desktop
 
+%if 0%{?is_opensuse}
+# Copy the icon for amzdownloader over from breeze
+for i in 16 22 24
+do
+   mkdir -p %{buildroot}%{_kde4_iconsdir}/hicolor/${i}x${i}/actions
+   cp %{_kde4_iconsdir}/breeze/actions/${i}/download.svg 
%{buildroot}%{_kde4_iconsdir}/hicolor/${i}x${i}/actions/
+done
+%else
 # Copy the icon for amzdownloader over from oxygen
 for i in 16 22 32 48
 do
    mkdir -p %{buildroot}%{_kde4_iconsdir}/hicolor/${i}x${i}/actions
    cp %{_kde4_iconsdir}/oxygen/${i}x${i}/actions/download.png 
%{buildroot}%{_kde4_iconsdir}/hicolor/${i}x${i}/actions/
 done
+%endif
 
 %suse_update_desktop_file amarok Qt KDE AudioVideo Audio Player
 %suse_update_desktop_file -r amzdownloader Qt KDE AudioVideo Audio Player
@@ -204,7 +220,7 @@
 %{_datadir}/dbus-1/interfaces/org.kde.amarok.Mpris2Extensions.Player.xml
 %{_datadir}/mime/packages/amzdownloader.xml
 %{_kde4_iconsdir}/hicolor/*/apps/amarok.*
-%{_kde4_iconsdir}/hicolor/*/actions/download.png
+%{_kde4_iconsdir}/hicolor/*/actions/download.*
 %{_kde4_appsdir}/amarok/
 %dir %{_kde4_appsdir}/desktoptheme
 %dir %{_kde4_appsdir}/desktoptheme/default

++++++ Fix-for-infinite-loop-with-some-Audio-CDs.patch ++++++
From: Stefano Pettini <[email protected]>
Date: Fri, 25 Mar 2016 09:15:18 +0000
Subject: Fix for the infinite loop in case a home-burned or old audio CD is 
inserted
X-Git-Url: 
http://quickgit.kde.org/?p=amarok.git&a=commitdiff&h=aaff3348862a1999069feff93d9e1e4d995b7225
---
Fix for the infinite loop in case a home-burned or old audio CD is inserted

Home-burned or old audio CDs usually don't have CDTEXT, that is what
was triggering the bug. The bug was releted to poor management of
track names, that are generated using the pattern "Track%1.wav". The
audiocd:/ KIO protocol requires that a device is also added to the
URL, and this was not done everywhere. Lack of device was triggering
an unexpected/strange behaviour in some KDE function making Amarok
enter an infinite loop.

REVIEW: 127468
BUG: 339190
---


--- a/src/core-impl/collections/audiocd/AudioCdCollection.cpp
+++ b/src/core-impl/collections/audiocd/AudioCdCollection.cpp
@@ -91,7 +91,9 @@
 AudioCdCollection::audiocdUrl( const QString &path ) const
 {
     KUrl url("audiocd:/");
-    url.addPath( path );
+
+    if( !path.isEmpty() )
+        url.addPath( path );
 
     if( !m_device.isEmpty() )
         url.addQueryItem( "device", m_device );
@@ -346,10 +348,32 @@
     }
 }
 
+
+QString
+AudioCdCollection::trackBaseFileName( int i ) const
+{
+    return QString( "Track%1" ).arg( i, 2, 10, QChar('0') );
+}
+
+
+QString
+AudioCdCollection::trackWavFileName( int i ) const
+{
+    return trackBaseFileName( i ) + ".wav";
+}
+
+
+QString
+AudioCdCollection::trackDisplayName( int i ) const
+{
+    return i18n( "Track" ) + ' ' + QString::number( i );
+}
+
+
 qint64
-AudioCdCollection::trackLength(int i) const
-{
-    KUrl kioUrl = audiocdUrl( QString("Track%1.wav").arg(i, 2, 10, QChar('0') 
) );
+AudioCdCollection::trackLength( int i ) const
+{
+    KUrl kioUrl = audiocdUrl( trackWavFileName( i ) );
     KIO::UDSEntry uds;
     if ( KIO::NetAccess::stat(kioUrl, uds, NULL) )
     {
@@ -480,19 +504,21 @@
 
 
     int i = 1;
-    QString prefix( "0" );
-    QString trackName = "Track " + prefix + QString::number( i );
-
-    while( KIO::NetAccess::exists( QString( "audiocd:/" + trackName + ".wav" 
), KIO::NetAccess::SourceSide, 0 ) )
-    {
-        debug() << "got track: " << "audiocd:/" + trackName + ".wav";
-
-        QString baseUrl = "audiocd:/" + m_discCddbId + '/' + QString::number( 
i );
-
-        Meta::AudioCdTrackPtr trackPtr = Meta::AudioCdTrackPtr( new 
Meta::AudioCdTrack( this, trackName, baseUrl ) );
+    QString trackWav = trackWavFileName( i );
+
+    // This will find also data tracks on mixed CDs:
+    // a better way to discover the available audio tracks should be found
+    while( KIO::NetAccess::exists( audiocdUrl( trackWav ), 
KIO::NetAccess::SourceSide, 0 ) )
+    {
+        debug() << "got track url: " << audiocdUrl( trackWav );
+
+        //we hack the url so the engine controller knows what track on the CD 
to play..
+        KUrl baseUrl = audiocdUrl( m_discCddbId + '/' + QString::number( i ) );
+
+        Meta::AudioCdTrackPtr trackPtr = Meta::AudioCdTrackPtr( new 
Meta::AudioCdTrack( this, trackDisplayName( i ), baseUrl ) );
 
         trackPtr->setTrackNumber( i );
-        trackPtr->setFileNameBase( trackName );
+        trackPtr->setFileNameBase( trackBaseFileName( i ) );
         trackPtr->setLength( trackLength( i ) );
 
         memoryCollection()->addTrack( Meta::TrackPtr::staticCast( trackPtr ) );
@@ -513,8 +539,7 @@
         trackPtr->setYear( yearPtr );
 
         i++;
-        prefix = i < 10 ? "0" : "";
-        trackName = "Track " + prefix + QString::number( i );
+        trackWav = trackWavFileName( i );
     }
 
     updateProxyTracks();

--- a/src/core-impl/collections/audiocd/AudioCdCollection.h
+++ b/src/core-impl/collections/audiocd/AudioCdCollection.h
@@ -103,6 +103,13 @@
 
     // Helper function to build the audiocd url.
     KUrl audiocdUrl( const QString &path = "" ) const;
+    // The file name of the track without extension
+    QString trackBaseFileName( int i ) const;
+    // The file name of the track in .wav format
+    QString trackWavFileName( int i ) const;
+    // The name of the track that should be displayed
+    QString trackDisplayName( int i ) const;
+    // The length of the track in milliseconds
     qint64 trackLength( int i ) const;
 
     /**


Reply via email to