Bug 446098

Summary: Media player applet is not reset when there is no player
Product: [Plasma] plasmashell Reporter: Fushan Wen <qydwhotmail>
Component: Media PlayerAssignee: Fushan Wen <qydwhotmail>
Status: RESOLVED FIXED    
Severity: normal CC: nate, plasma-bugs
Priority: NOR    
Version: master   
Target Milestone: 1.0   
Platform: openSUSE   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=447169
Latest Commit: Version Fixed In: 5.24

Description Fushan Wen 2021-11-26 03:52:15 UTC
SUMMARY
When all players are closed, media player applet on the desktop still shows a track from the last player, and player control buttons are still clickable but have no effect.


STEPS TO REPRODUCE
1. Add media player applet to the desktop
2. Open Audacious and play any song
3. Close Audacious

OBSERVED RESULT
Media player applet is not reset.

EXPECTED RESULT
Media player applet is reset.

SOFTWARE/OS VERSIONS
Information for package plasma5-desktop:
----------------------------------------
Repository     : unstable-kde-frameworks
Name           : plasma5-desktop
Version        : 5.23.80git.20211125T020221~c193fd4c3-ku.67.1
Arch           : x86_64
Vendor         : obs://build.opensuse.org/KDE:Unstable
Installed Size : 8.8 MiB
Installed      : Yes
Status         : out-of-date (version 5.23.80git.20211124T013809~d3bb439d6-ku.66.1 installed)
Source package : plasma5-desktop-5.23.80git.20211125T020221~c193fd4c3-ku.67.1.src
Summary        : The KDE Plasma Workspace Components
Description    : 
    This package contains the basic packages for a Plasma workspace.
Comment 1 Bug Janitor Service 2021-11-26 04:14:23 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1223
Comment 2 Fushan Wen 2021-12-01 00:22:45 UTC
Git commit 1a1f672c4221bd5a876fbaedfd647445d82a229a by Fushan Wen.
Committed on 01/12/2021 at 00:14.
Pushed by ngraham into branch 'master'.

dataengines/mpris2: Delete Multiplexer when there is no player

When all players are closed, media player applet on the
desktop still shows a track from the last player, and
player control buttons are still clickable but have no effect.

Add a new signal named `playerListEmptied()`. When the proxy list is empty,
the signal is emitted and `m_multiplexer` is scheduled to be deleted, so
the media player applet on the desktop can indicate the right status of
no player opened.
FIXED-IN: 5.24

M  +2    -0    dataengines/mpris2/mpris2engine.cpp
M  +5    -0    dataengines/mpris2/multiplexer.cpp
M  +7    -0    dataengines/mpris2/multiplexer.h

https://invent.kde.org/plasma/plasma-workspace/commit/1a1f672c4221bd5a876fbaedfd647445d82a229a