public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Rex Dieter <rdieter@fedoraproject.org>
To: git-commits@fedoraproject.org
Subject: [rpms/amarok] epel10.2: don't query kwallet for lastfm credentials on every track change (kde#278177)
Date: Mon, 06 Jul 2026 18:31:29 GMT [thread overview]
Message-ID: <178336268926.1.17186455197669999991.rpms-amarok-1c1351f47322@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/amarok
Branch : epel10.2
Commit : 1c1351f473228184dcf2efe2c0d1d398ca997370
Author : Rex Dieter <rdieter@fedoraproject.org>
Date : 2011-07-24T09:18:24-05:00
Stats : +165/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/amarok/c/1c1351f473228184dcf2efe2c0d1d398ca997370?branch=epel10.2
Log:
don't query kwallet for lastfm credentials on every track change (kde#278177)
---
diff --git a/amarok-2.4.2-kde278177.patch b/amarok-2.4.2-kde278177.patch
new file mode 100644
index 0000000..8649215
--- /dev/null
+++ b/amarok-2.4.2-kde278177.patch
@@ -0,0 +1,158 @@
+commit 8c9728264176b9da37b7118a700ae383a98a4d04
+Author: Sam Lade <sam@sentynel.com>
+Date: Sat Jul 23 23:25:00 2011 +0100
+
+ Prevent KWallet being queried on every track change by last.fm
+
+ Just look up the scrobbleComposer value from config directly,
+ rather than creating a whole lastFmServiceConfig object just to get it
+ BUG:278177
+ FIXED-IN:2.4.3
+
+diff --git a/src/services/lastfm/LastFmService.cpp b/src/services/lastfm/LastFmService.cpp
+index cef152c..ce0b6ec 100644
+--- a/src/services/lastfm/LastFmService.cpp
++++ b/src/services/lastfm/LastFmService.cpp
+@@ -182,6 +182,7 @@ LastFmService::LastFmService( LastFmServiceFactory* parent, const QString &name,
+ m_userinfo( 0 ),
+ m_userName( username ),
+ m_sessionKey( sessionKey ),
++ m_password( password ),
+ m_scrobbleComposer( scrobbleComposer ),
+ m_userNameArray( 0 ),
+ m_sessionKeyArray( 0 )
+@@ -221,9 +222,6 @@ LastFmService::~LastFmService()
+ void
+ LastFmService::init()
+ {
+- LastFmServiceConfig config;
+- const QString password = config.password();
+- const QString sessionKey = config.sessionKey();
+ // set the global static Lastfm::Ws stuff
+ lastfm::ws::ApiKey = Amarok::lastfmApiKey();
+ lastfm::ws::SharedSecret = "fe0dcde9fcd14c2d1d50665b646335e9";
+@@ -237,10 +235,10 @@ LastFmService::init()
+
+ debug() << "username:" << QString( QUrl::toPercentEncoding( lastfm::ws::Username ) );
+
+- const QString authToken = md5( QString( "%1%2" ).arg( m_userName ).arg( md5( password.toUtf8() ) ).toUtf8() );
++ const QString authToken = md5( QString( "%1%2" ).arg( m_userName ).arg( md5( m_password.toUtf8() ) ).toUtf8() );
+
+ // now authenticate w/ last.fm and get our session key if we don't have one
+- if( sessionKey.isEmpty() )
++ if( m_sessionKey.isEmpty() )
+ {
+ debug() << "got no saved session key, authenticating with last.fm";
+ QMap<QString, QString> query;
+@@ -254,9 +252,8 @@ LastFmService::init()
+ } else
+ {
+ debug() << "using saved sessionkey from last.fm";
+- m_sessionKeyArray = qstrdup( sessionKey.toLatin1().data() );
++ m_sessionKeyArray = qstrdup( m_sessionKey.toLatin1().data() );
+ lastfm::ws::SessionKey = m_sessionKeyArray;
+- m_sessionKey = sessionKey;
+
+ if( m_scrobble )
+ m_scrobbler = new ScrobblerAdapter( this, "ark" );
+diff --git a/src/services/lastfm/LastFmService.h b/src/services/lastfm/LastFmService.h
+index 2b622bf..ac13d41 100644
+--- a/src/services/lastfm/LastFmService.h
++++ b/src/services/lastfm/LastFmService.h
+@@ -116,6 +116,7 @@ private:
+
+ QString m_userName;
+ QString m_sessionKey;
++ QString m_password;
+ QString m_station;
+ QString m_age;
+ QString m_gender;
+diff --git a/src/services/lastfm/ScrobblerAdapter.cpp b/src/services/lastfm/ScrobblerAdapter.cpp
+index 5bbb6ec..513560d 100644
+--- a/src/services/lastfm/ScrobblerAdapter.cpp
++++ b/src/services/lastfm/ScrobblerAdapter.cpp
+@@ -81,8 +81,6 @@ ScrobblerAdapter::trackPlaying( Meta::TrackPtr track )
+ {
+ m_lastSaved = m_lastPosition; // HACK engineController is broken :(
+
+- LastFmServiceConfig config;
+-
+ debug() << "track type:" << track->type();
+ const bool isRadio = ( track->type() == "stream/lastfm" );
+
+@@ -92,8 +90,8 @@ ScrobblerAdapter::trackPlaying( Meta::TrackPtr track )
+
+ m_current.setTitle( track->name() );
+ m_current.setDuration( track->length() / 1000 );
+- debug() << "scrobbleComposer: " << config.scrobbleComposer();
+- if( track->composer() && config.scrobbleComposer() )
++ debug() << "scrobbleComposer: " << scrobbleComposer();
++ if( track->composer() && scrobbleComposer() )
+ m_current.setArtist( track->composer()->name() );
+ else if( track->artist() )
+ m_current.setArtist( track->artist()->name() );
+@@ -133,12 +131,10 @@ void
+ ScrobblerAdapter::trackMetadataChanged( Meta::TrackPtr track )
+ {
+ DEBUG_BLOCK
+- LastFmServiceConfig config;
+-
+ // if we are listening to a stream, take the new metadata as a "new track" and, if we have enough info, save it for scrobbling
+ if( track &&
+ ( track->type() == "stream" && ( !track->name().isEmpty()
+- && ( track->artist() || ( track->composer() && config.scrobbleComposer() ) ) ) ) )
++ && ( track->artist() || ( track->composer() && scrobbleComposer() ) ) ) ) )
+ // got a stream, and it has enough info to be a new track
+ {
+ // don't use checkScrobble as we don't need to check timestamps, it is a stream
+@@ -150,12 +146,12 @@ ScrobblerAdapter::trackMetadataChanged( Meta::TrackPtr track )
+
+ m_current.setTitle( track->name() );
+ m_current.setArtist(
+- track->composer() && config.scrobbleComposer()
++ track->composer() && scrobbleComposer()
+ ? track->composer()->name()
+ : track->artist()->name()
+ );
+ m_current.stamp();
+-
++
+ m_current.setSource( lastfm::Track::NonPersonalisedBroadcast );
+
+ if( !m_current.isNull() )
+@@ -227,11 +223,9 @@ ScrobblerAdapter::loveTrack( Meta::TrackPtr track ) // slot
+
+ if( track )
+ {
+- LastFmServiceConfig config;
+-
+ lastfm::MutableTrack trackInfo;
+ trackInfo.setTitle( track->name() );
+- if( track->composer() && config.scrobbleComposer() )
++ if( track->composer() && scrobbleComposer() )
+ trackInfo.setArtist( track->composer()->name() );
+ else if( track->artist() )
+ trackInfo.setArtist( track->artist()->name() );
+@@ -280,3 +274,10 @@ ScrobblerAdapter::checkScrobble()
+ }
+ resetVariables();
+ }
++
++bool
++ScrobblerAdapter::scrobbleComposer()
++{
++ KConfigGroup config = KGlobal::config()->group( LastFmServiceConfig::configSectionName() );
++ return config.readEntry( "scrobbleComposer", false );
++}
+diff --git a/src/services/lastfm/ScrobblerAdapter.h b/src/services/lastfm/ScrobblerAdapter.h
+index 5ee77d7..dd67415 100644
+--- a/src/services/lastfm/ScrobblerAdapter.h
++++ b/src/services/lastfm/ScrobblerAdapter.h
+@@ -50,6 +50,7 @@ private slots:
+ private:
+ void resetVariables();
+ void checkScrobble();
++ bool scrobbleComposer();
+
+ lastfm::Audioscrobbler *m_scrobbler;
+ lastfm::MutableTrack m_current;
diff --git a/amarok.spec b/amarok.spec
index ca431dd..9e3daeb 100644
--- a/amarok.spec
+++ b/amarok.spec
@@ -2,7 +2,7 @@
Name: amarok
Summary: Media player
Version: 2.4.2
-Release: 1%{?dist}
+Release: 2%{?dist}
Group: Applications/Multimedia
# KDE e.V. may determine that future GPL versions are accepted
@@ -14,6 +14,8 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
#Patch50: amarok-2.2.1.90-qtscript_not_required.patch
## upstream patches
+# http://commits.kde.org/amarok/8c9728264176b9da37b7118a700ae383a98a4d04
+Patch100: amarok-2.4.2-kde278177.patch
BuildRequires: curl-devel
BuildRequires: desktop-file-utils
@@ -82,6 +84,7 @@ Obsoletes: amarok-utilities < 2.0.96
%setup -q
#patch50 -p1 -b .qtscript_not_required
+%patch100 -p1 -b .kde278177
%build
@@ -179,6 +182,9 @@ fi
%changelog
+* Sun Jul 24 2011 Rex Dieter <rdieter@fedoraproject.org> 2.4.2-2
+- don't query kwallet for lastfm credentials on every track change (kde#278177)
+
* Fri Jul 22 2011 Rex Dieter <rdieter@fedoraproject.org> 2.4.2-1
- 2.4.2
reply other threads:[~2026-07-06 18:31 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178336268926.1.17186455197669999991.rpms-amarok-1c1351f47322@fedoraproject.org \
--to=rdieter@fedoraproject.org \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox