diff --git a/hosts/wim/config/ags/js/media-player/player.js b/hosts/wim/config/ags/js/media-player/player.js index 3a752ec9..8ad8d8b2 100644 --- a/hosts/wim/config/ags/js/media-player/player.js +++ b/hosts/wim/config/ags/js/media-player/player.js @@ -93,9 +93,17 @@ export default () => Box({ ], connections: [ [Mpris, (overlay, busName) => { - if (!busName || overlay._players.has(busName)) + if (overlay._players.has(busName)) return; + if (!busName) { + let player = Mpris.players.find(p => !overlay._players.has(p.busName)); + if (player) + busName = player.busName; + else + return; + } + const player = Mpris.getPlayer(busName); player.colors = Variable(); overlay._players.set(busName, PlayerBox(player));