Bug 225852

Summary: wrong lyrics are downloaded when quickly switching tracks
Product: [Applications] amarok Reporter: Viktor Havrysh <loonyphoenix>
Component: generalAssignee: Amarok Bugs <amarok-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: normal CC: martin.blumenstingl
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Viktor Havrysh 2010-02-07 19:25:00 UTC
Version:           2.2-GIT (using 4.3.98 (KDE 4.3.98 (KDE 4.4 RC3)), Arch Linux)
Compiler:          gcc
OS:                Linux (i686) release 2.6.32-ice

If, when playing a music track for which lyrics are being downloaded, you switch the track to the next one, the lyrics displayed are for the previous track.
Comment 1 Viktor Havrysh 2010-02-07 19:34:15 UTC
PS: This only happens when both tracks have never been played (the first, because the lyrics wouldn't have to be downloaded at all; the next one, because otherwise the cached lyrics are displayed at once for some reason)
Comment 2 Martin Blumenstingl 2010-02-07 19:43:00 UTC
here's some background information about that bug:

if the lyrics script would store the URL of the track we could work around that bug

currently this is what happens:
-amarok tells the lyrics script: fetch lyrics for 'xyz'
-user changes the track to 'abc'
-lyrics script says: 'I got lyrics for xyz - here you go..'

if we would check if the URL of the requested track is the same as the URL of the current track we could call setLyricsForTrack(uidOfRequestedTrack, lyrics) instead of showLyrics

that way the fetched lyrics were not lost (good for users with low bandwidth) and the lyrics for the current track were displayed later with showLyrics(Html)
Comment 3 Myriam Schweingruber 2010-02-08 00:31:28 UTC

*** This bug has been marked as a duplicate of bug 198381 ***