Summary: | Paused music started playing on suspend | ||
---|---|---|---|
Product: | [Applications] juk | Reporter: | Arthur Schiwon <blizzz> |
Component: | general | Assignee: | Kai Uwe Broulik <kde> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | coque.couto, kde, mpyne, nate, nortexoid |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | https://commits.kde.org/juk/57457aee76ec28a3ed590ff559da60b353864ad6 | Version Fixed In: | 18.04 |
Sentry Crash Report: |
Description
Arthur Schiwon
2017-06-16 08:03:17 UTC
Paging Dr. Broulik! :) PowerDevil sends the "Pause" command to the player (not PlayPause) which according to MPris spec [1] "If playback is already paused, this has no effect.", so this is a bug in the player, it works fine with e.g. VLC, re-assigning. [1] https://specifications.freedesktop.org/mpris-spec/latest/Player_Interface.html#Method:Pause The following patch should fix. I'd commit directly but I don't have a KDE 4 dev environment setup, so if someone can test that this work I'd appreciate it, otherwise I can establish one overnight and try again in a bit. (Yes, I know I need to port JuK to KF5... right now I'm going to try for a mini-sprint in mid-July for this) diff --git a/playermanager.cpp b/playermanager.cpp index 6ca08e0..3a2e091 100644 --- a/playermanager.cpp +++ b/playermanager.cpp @@ -276,11 +276,7 @@ void PlayerManager::play() void PlayerManager::pause() { - if(!m_setup) - return; - - if(paused()) { - play(); + if(!m_setup || paused()) { return; } The fix seems not to have made its way into version 17.12.2 which resumes play on resume from suspend. Now that you mention it, it didn't make it into any version of JuK because I never got feedback so I forgot about this one. :( Git commit 57457aee76ec28a3ed590ff559da60b353864ad6 by Michael Pyne. Committed on 06/03/2018 at 02:54. Pushed by mpyne into branch 'master'. mpris: Don't toggle playback with "Pause". We already have a separate playPause action for this, both in the MPRIS2 DBus adaptor, and in PlayerManager. This also fixes playback resuming when the computer is suspended (Plasma sends the "Pause" command to each media player regardless of whether it's playing, and JuK incorrectly treats that as a request to toggle playback). FIXED-IN:18.04 M +1 -6 playermanager.cpp https://commits.kde.org/juk/57457aee76ec28a3ed590ff559da60b353864ad6 Thanks again! |