filter mpris ghost players with no track or active state
This commit is contained in:
parent
5e91c86ab6
commit
e660c8c868
1 changed files with 1 additions and 1 deletions
|
|
@ -12,7 +12,7 @@ M.BarSection {
|
|||
tooltip: ""
|
||||
|
||||
property int _playerIdx: 0
|
||||
readonly property var _players: Mpris.players.values ?? []
|
||||
readonly property var _players: (Mpris.players.values ?? []).filter(p => p.trackTitle || p.playbackState === MprisPlaybackState.Playing || p.playbackState === MprisPlaybackState.Paused)
|
||||
readonly property MprisPlayer player: _players[_playerIdx] ?? _players[0] ?? null
|
||||
readonly property bool playing: player?.playbackState === MprisPlaybackState.Playing
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue