Bug 362473

Summary: Expanded Media Controller widget causes Next song to start from Slider value of current song
Product: [Plasma] plasmashell Reporter: Rajeesh K V <rajeeshknambiar>
Component: Media PlayerAssignee: Kai Uwe Broulik <kde>
Status: RESOLVED FIXED    
Severity: normal CC: mklapetek, plasma-bugs, rajeeshknambiar
Priority: NOR    
Version: 5.6.2   
Target Milestone: 1.0   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: D-Bus monitor output
Fix playing next/previous song seeking

Description Rajeesh K V 2016-04-29 12:21:37 UTC
Using VLC to play songs. While a song is in progress (say 50%) open Media Controller widget and press 'Next'. The next song often starts from the middle instead of start. Same issue with 'Previous' button as well. Probably something to do with Slider value and delayed timer setting it.
Possibly related to bugs #35815 and #341446.

Reproducible: Sometimes

Steps to Reproduce:
1. Add a bunch of songs to VLC playlist and start play.
2. When the first song is into playing few seconds, open Media Controller and press 'Next'
3. Observe that next song doesn't start from beginning, but skipped to the position of previously playing song.

Actual Results:  
Next song doesn't start from beginning, but skipped to the position of previously playing song.

Expected Results:  
Next song doesn't start from beginning.

Not always reproducible. Possibly a race condition with the timer enabled slider seeking code?
Comment 1 Rajeesh K V 2016-04-29 12:22:44 UTC
Created attachment 98686 [details]
D-Bus monitor output
Comment 2 Kai Uwe Broulik 2016-04-29 12:37:49 UTC
Looks like it, perhaps just restarting the timer when pressing next should work
Comment 3 Rajeesh K V 2016-04-29 12:59:06 UTC
Created attachment 98687 [details]
Fix playing next/previous song seeking

That didn't quite work, but the attached patch to reset Slider value seems to work. Does this look okay?
Comment 4 Kai Uwe Broulik 2016-04-29 13:00:20 UTC
Can you put that on RB pls, thx
Comment 5 Rajeesh K V 2016-04-29 13:07:26 UTC
https://git.reviewboard.kde.org/r/127789/
Comment 6 Rajeesh K V 2016-04-29 13:20:50 UTC
Git commit 0e2af335dcd112a7acefcf226cc56f5df518adad by Rajeesh K V.
Committed on 29/04/2016 at 13:20.
Pushed by knambiar into branch 'master'.

[Media Controller[: Fix playing next/previous song seeking

Seems the Slider value is not reset when Next/Previous buttons are pressed
in Media Controller widget. This causes next/previous song to seek the slider
position instead of starting from beginning.
REVIEW: 127789

M  +8    -2    applets/mediacontroller/contents/ui/ExpandedRepresentation.qml

http://commits.kde.org/plasma-workspace/0e2af335dcd112a7acefcf226cc56f5df518adad