Bug 341446 - plasmashell causes media player to skip songs
Summary: plasmashell causes media player to skip songs
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Media Player (show other bugs)
Version: 5.1.1
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Kai Uwe Broulik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-30 20:10 UTC by illumilore
Modified: 2016-06-14 11:09 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
D-Bus log from bustle if duration of next song is more than current one. (78.11 KB, application/vnd.tcpdump.pcap)
2014-12-07 13:00 UTC, Mikhail Ivchenko
Details
D-Bus log from bustle if duration of next song is less than current one. (70.14 KB, application/vnd.tcpdump.pcap)
2014-12-07 13:02 UTC, Mikhail Ivchenko
Details
Possible fix for issue (612 bytes, patch)
2016-06-14 11:09 UTC, matsjoyce
Details

Note You need to log in before you can comment on or make changes to this bug.
Description illumilore 2014-11-30 20:10:04 UTC
When using plasmashell and audacious media player, the media player will skip songs in its queue after finishing the previous song because plasmashell is telling it to seek to the end. If plasmashell is killed, audacious stops skipping the songs.

Reproducible: Always
Comment 1 David Edmundson 2014-12-03 15:05:22 UTC
Sounds unlikely. 
Could you please capture the DBus traffic with bustle and reproduce the issue and upload the file.
Comment 2 illumilore 2014-12-04 05:36:43 UTC
"Sounds unlikely."
When the media thing is running, amarok (when it isn't crashing) skips the songs, and audacious. When it is not running, neither of the programs skips. What else could it be?

Where do I find bustle? It isn't in any of the opensuse repos.
Comment 3 Kai Uwe Broulik 2014-12-04 10:09:52 UTC
I haven't observed that with Amarok or VLC. Will try Audacious though.

The mediacontroller has an internal Timer that increments the slider ever second since some players are just broken. Maybe that causes it, for some reason, to emit a seek signal. I guess I should check whether the Timer is still needed, given VLC fixed quite a lot of mpris related issues in the upcoming release.
Comment 4 Martin Klapetek 2014-12-04 10:20:24 UTC
The timer is needed to simply move the slider locally iirc, as opposed to polling the dbus every second (as not all players send dbus updates every second).
Comment 5 Mikhail Ivchenko 2014-12-07 13:00:13 UTC
Created attachment 89857 [details]
D-Bus log from bustle if duration of next song is more than current one.

Tried to reproduce.
Looks like there is 2 cases in end of current song:
#1 If duration of next song is more than current one - nothings happens, It's just start playing next song as it should be.
#2 If duration of next song is more than current one - it skips to end of next song.
Attached dbus log from busstle for case #1.
Comment 6 Mikhail Ivchenko 2014-12-07 13:02:33 UTC
Created attachment 89858 [details]
D-Bus log from bustle if duration of next song is less than current one.
Comment 7 Kai Uwe Broulik 2014-12-07 17:13:56 UTC
Git commit 48e2c38930b820dfe1c5cabaf126012ff1256b1e by Kai Uwe Broulik.
Committed on 07/12/2014 at 17:12.
Pushed by broulik into branch 'master'.

Delay seeking over mpris

This avoids race conditions between mpris telling us that the position changed, our internal
Timer and the slider

M  +13   -4    applets/mediacontroller/contents/ui/ExpandedRepresentation.qml

http://commits.kde.org/plasma-workspace/48e2c38930b820dfe1c5cabaf126012ff1256b1e
Comment 8 Dainius Masiliūnas 2015-03-14 19:29:08 UTC
I just updated to Plasma 5 Workspace 5.2.1, and the issue still persists. When the Media Controller is enabled, every few music tracks (using Amarok with Phonon-GStreamer) one track is skipped, or starts playing from the middle, or gets stuck altogether. Disabling the Media Controller makes these problems go away.
Comment 9 Franz Trischberger 2015-03-30 06:55:56 UTC
This might also be caused by buggy implementation of the mpris service.
I have similar issues with mpDris2:
https://github.com/eonpatapon/mpDris2/issues/63
As soon as I switch to cantata the problems go away.
Comment 10 Dainius Masiliūnas 2015-08-04 19:52:10 UTC
This is still not fixed in Plasma 5.3.2!
Comment 11 Dainius Masiliūnas 2015-09-05 22:56:55 UTC
Still not fixed in Plasma 5.4.
Comment 12 matsjoyce 2016-06-14 11:09:11 UTC
Created attachment 99495 [details]
Possible fix for issue
Comment 13 matsjoyce 2016-06-14 11:09:48 UTC
Still not fixed in 5.6.4 BTW.