Version: 2.1-SVN (using KDE 4.2.1)
Compiler: gcc 4.3.3
Installed from: Ubuntu Packages
While playing a track from the local collection (or while paused), switching to a last.fm station causes the first track's progress bar to act as though the track's length were the same as the track that was being played from the local collection (the text to the left and right of the bar is correct, though). This is most evident when playing a really short track from the local collection and switching to a last.fm station.
When further tracks from the last.fm station are played, the progress bar behaves normally.
I am using Xine with PulseAudio--I have not tested anything else.
Created attachment 32491 [details]
Fixes progress bar when starting last.fm stream
Upon investigation, it seems that on the first track of a last.fm stream, Phonon still thinks the length of the track is the length of the previous track. For the following tracks, it thinks it's 0 (and the code rightly ignored Phonon when it reported 0). A signal is also triggered that sets the length to the length of the last track.
I have attached a patch that prefers the track length in Meta::Track over that reported by Phonon. Also, when Phonon triggers trackLengthChanged(), trackLength() is called to get the correct length of the track (instead of believing what Phonon reports).
I'd much rather see this addressed in phonon than addressed in this way. This would solve the problem, but it's one more thing to keep in mind every time we touch engine controller (and the list of things to keep in mind when touching that file is insane..)
Well, what are we going to do about this? Reassign to Phonon? Apply Michael's patch?
We need to a reach a conclusion. Just keeping the report open for the sake of it doesn't help anyone.
Adding Leo Franchi to CC list, as he is our Last.fm expert.
hmmm i agree with dan in theory, but i don't really know how to fix it in phonon. also, it doesn't really seem to be a "hack" or workaround in enginecontroller, as it just changes the functionality to prefer the Meta::Track length of the phonon-reported length if we have a valid length from Meta::Track.
all in all i'm in favor of the patch.
SVN commit 955976 by markey:
Fixed problem with Amarok showing wrong track length for Last.fm
streams. Patch by Michael Quinn <firstname.lastname@example.org>.
M +2 -0 ChangeLog
M +7 -2 src/EngineController.cpp
WebSVN link: http://websvn.kde.org/?view=rev&revision=955976