Bug 278177 - amarok spams user for kwallet credentials on every track change
Summary: amarok spams user for kwallet credentials on every track change
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: Services/Last.fm (show other bugs)
Version: 2.4.1.90
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: 2.4.2
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-21 03:25 UTC by Jorge Manuel B. S. Vicetto
Modified: 2011-07-24 14:21 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In: 2.4.3


Attachments
Potential patch (7.03 KB, patch)
2011-07-21 23:35 UTC, Sam Lade
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jorge Manuel B. S. Vicetto 2011-07-21 03:25:33 UTC
Version:           2.4.1.90 (using Devel) 
OS:                Linux

I just installed a new system and on initial testing of amarok, it spammed me on every track change requesting for kwallet credentials. The use of kwallet is related to my config of last.fm intregration. This happened while I had in the kwallet config that it should "close when last application stops using it". After I disabled all close options from kwallet and configured it to allow amarok to use it forever, the spamming stopped.
From the exhibited behaviour, it seems like amarok is likely opening a kwallet connection on a new track, getting any details from it, closing the connection and repeating the process on the next track.
I believe it would make more sense for amarok to open a connection to kwallet on startup and keep that open until amarok is closed.

Reproducible: Couldn't Reproduce

Steps to Reproduce:
When I enabled in the kwallet config the "close when last application stops using it" option and restarted amarok, I didn't got the spam again.

Actual Results:  
No more spam

Expected Results:  
Shouldn't have spammed me in the first place
Comment 1 Jorge Manuel B. S. Vicetto 2011-07-21 03:35:54 UTC
As requested by Sentynel on #amarok, to make it clear, this is on KDE-4.6.95.
Comment 2 Sam Lade 2011-07-21 23:35:38 UTC
Created attachment 62062 [details]
Potential patch

Could you test this patch, please? It doesn't seem to break anything for me, and should prevent repeated openings of the KWallet, but I can't reproduce the auth spam in the first place to test.
Comment 3 Sam Lade 2011-07-21 23:40:10 UTC
Of course, I've just realised that this will mean changes to scrobbleComposer aren't registered immediately, but if this actually fixes the issue that can be dealt with.
Comment 4 Sam Lade 2011-07-23 23:21:26 UTC
Git commit 8c9728264176b9da37b7118a700ae383a98a4d04 by Sam Lade.
Committed on 24/07/2011 at 00:25.
Pushed by lade into branch 'master'.

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

M  +1    -0    src/services/lastfm/LastFmService.h
M  +4    -7    src/services/lastfm/LastFmService.cpp
M  +13   -12   src/services/lastfm/ScrobblerAdapter.cpp
M  +1    -0    src/services/lastfm/ScrobblerAdapter.h

http://commits.kde.org/amarok/8c9728264176b9da37b7118a700ae383a98a4d04