public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/amarok] epel10: - add patch for kde bug 147126 : amarok freezes when trying to play mp3
@ 2026-07-06 18:03 Aurelien Bompard
  0 siblings, 0 replies; only message in thread
From: Aurelien Bompard @ 2026-07-06 18:03 UTC (permalink / raw)
  To: git-commits

        A new commit has been pushed.

        Repo   : rpms/amarok
        Branch : epel10
        Commit : 1b07e27bd778b9862be4fafd2868bfff64bc8fbf
        Author : Aurelien Bompard <abompard@fedoraproject.org>
        Date   : 2007-09-02T12:44:51+00:00
        Stats  : +85/-1 in 2 file(s)
        URL    : https://src.fedoraproject.org/rpms/amarok/c/1b07e27bd778b9862be4fafd2868bfff64bc8fbf?branch=epel10

        Log:
        - add patch for kde bug 147126 : amarok freezes when trying to play mp3
files without mp3 support

---
diff --git a/amarok-1.4.7-147126.patch b/amarok-1.4.7-147126.patch
new file mode 100644
index 0000000..b5d7f05
--- /dev/null
+++ b/amarok-1.4.7-147126.patch
@@ -0,0 +1,78 @@
+diff -up ./amarok/src/statusbar/statusBarBase.cpp.147126 ./amarok/src/statusbar/statusBarBase.cpp
+--- ./amarok/src/statusbar/statusBarBase.cpp.147126	2007-08-07 19:48:28.000000000 +0200
++++ ./amarok/src/statusbar/statusBarBase.cpp	2007-09-02 13:55:38.000000000 +0200
+@@ -25,6 +25,7 @@
+ #include "squeezedtextlabel.h"
+ #include "statusBarBase.h"
+ #include "threadmanager.h"
++#include "enginecontroller.h"
+ 
+ #include <kio/job.h>
+ #include <kiconloader.h>
+@@ -343,9 +344,13 @@ StatusBar::longMessageThreadSafe( const 
+ void
+ StatusBar::customEvent( QCustomEvent *e )
+ {
+-    QString *s = static_cast<QString*>( e->data() );
+-    longMessage( *s );
+-    delete s;
++    if(e->type() == 1000 ){
++      QString *s = static_cast<QString*>( e->data() );
++      longMessage( *s );
++      delete s;
++    }else if(e->type() == 2000 ){
++      EngineController::instance()->unplayableNotification();
++    }
+ }
+ 
+ 
+diff -up ./amarok/src/enginecontroller.cpp.147126 ./amarok/src/enginecontroller.cpp
+--- ./amarok/src/enginecontroller.cpp.147126	2007-08-07 19:48:28.000000000 +0200
++++ ./amarok/src/enginecontroller.cpp	2007-09-02 13:55:38.000000000 +0200
+@@ -244,13 +244,10 @@ bool EngineController::canDecode( const 
+     if( engine() != EngineController::instance()->m_voidEngine )
+     {
+         //we special case this as otherwise users hate us
+-        if ( !valid && ext.lower() == "mp3" && !installDistroCodec(AmarokConfig::soundSystem()) )
+-            Amarok::StatusBar::instance()->longMessageThreadSafe(
+-                    i18n( "<p>The %1 claims it <b>cannot</b> play MP3 files."
+-                        "<p>You may want to choose a different engine from the <i>Configure Dialog</i>, or examine "
+-                        "the installation of the multimedia-framework that the current engine uses. "
+-                        "<p>You may find useful information in the <i>FAQ</i> section of the <i>Amarok HandBook</i>." )
+-                    .arg( AmarokConfig::soundSystem() ), KDE::StatusBar::Error );
++        if ( !valid && ext.lower() == "mp3"){
++            QCustomEvent * e = new QCustomEvent( 2000 );
++            QApplication::postEvent( Amarok::StatusBar::instance(), e );
++ }
+ 
+         // Cache this result for the next lookup
+         if ( !ext.isEmpty() )
+@@ -260,6 +257,17 @@ bool EngineController::canDecode( const 
+     return valid;
+ }
+ 
++void EngineController::unplayableNotification() {
++
++    if( !installDistroCodec(AmarokConfig::soundSystem()))
++        Amarok::StatusBar::instance()->longMessageThreadSafe(
++                  i18n( "<p>The %1 claims it <b>cannot</b> play MP3 files."
++                        "<p>You may want to choose a different engine from the <i>Configure Dialog</i>, or examine "
++                        "the installation of the multimedia-framework that the current engine uses. "
++                        "<p>You may find useful information in the <i>FAQ</i> section of the <i>Amarok HandBook</i>." )
++                    .arg( AmarokConfig::soundSystem() ), KDE::StatusBar::Error );
++}
++
+ bool EngineController::installDistroCodec( const QString& engine /*Filetype type*/)
+ {
+     KService::Ptr service = KTrader::self()->query( "Amarok/CodecInstall"
+diff -up ./amarok/src/enginecontroller.h.147126 ./amarok/src/enginecontroller.h
+--- ./amarok/src/enginecontroller.h.147126	2007-08-07 19:48:28.000000000 +0200
++++ ./amarok/src/enginecontroller.h	2007-09-02 13:55:38.000000000 +0200
+@@ -52,6 +52,7 @@ public:
+     uint                     trackPosition() const;
+ 
+     EngineBase* loadEngine();
++    void unplayableNotification();
+ 
+     uint trackLength() const { return m_bundle.length() * 1000; }
+     const MetaBundle &bundle() const;

diff --git a/amarok.spec b/amarok.spec
index 0650cb9..46f84af 100644
--- a/amarok.spec
+++ b/amarok.spec
@@ -4,7 +4,7 @@
 Name:       amarok
 Summary:    Media player for KDE
 Version:    1.4.7
-Release:    3%{?dist}
+Release:    4%{?dist}
 
 Group: 	    Applications/Multimedia
 License:    GPLv2+
@@ -12,6 +12,7 @@ Url:        http://amarok.kde.org
 # http://download.kde.org/download.php?url=stable/amarok/1.4.3/src
 #Source0:    http://mirrors.isc.org/pub/kde/stable/amarok/%{version}/src/amarok-%{version}.tar.bz2
 Source0:    ftp://ftp.kde.org/pub/kde/stable/amarok/%{version}/src/amarok-%{version}.tar.bz2
+Patch0:     amarok-1.4.7-147126.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:  kdemultimedia-devel >= 6:3.2
@@ -85,6 +86,7 @@ use any of xmms' visualisation plugins with Amarok.
 
 %prep
 %setup -q
+%patch0 -p0 -b .147126
 
 
 
@@ -241,6 +243,10 @@ rm -fr $RPM_BUILD_ROOT
 
 
 %changelog
+* Sun Sep 02 2007 Aurelien Bompard <abompard@fedoraproject.org> 1.4.7-4
+- add patch for kde bug 147126 : amarok freezes when trying to play
+  mp3 files without mp3 support
+
 * Fri Aug 24 2007 Todd Zullinger <tmz@pobox.com> 1.4.7-3
 - rebuild with libgpod-0.5.2
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-07-06 18:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-06 18:03 [rpms/amarok] epel10: - add patch for kde bug 147126 : amarok freezes when trying to play mp3 Aurelien Bompard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox