summaryrefslogtreecommitdiff
path: root/services
diff options
context:
space:
mode:
Diffstat (limited to 'services')
-rw-r--r--services/Players.qml12
1 files changed, 10 insertions, 2 deletions
diff --git a/services/Players.qml b/services/Players.qml
index 27249af..22aab3f 100644
--- a/services/Players.qml
+++ b/services/Players.qml
@@ -10,14 +10,22 @@ Singleton {
id: root
readonly property list<MprisPlayer> list: Mpris.players.values
- readonly property MprisPlayer active: manualActive ?? list.find(p => getIdentity(p) === Config.services.defaultPlayer) ?? list[0] ?? null
- property MprisPlayer manualActive
+ readonly property MprisPlayer active: props.manualActive ?? list.find(p => getIdentity(p) === Config.services.defaultPlayer) ?? list[0] ?? null
+ property alias manualActive: props.manualActive
function getIdentity(player: MprisPlayer): string {
const alias = Config.services.playerAliases.find(a => a.from === player.identity);
return alias?.to ?? player.identity;
}
+ PersistentProperties {
+ id: props
+
+ property MprisPlayer manualActive
+
+ reloadableId: "players"
+ }
+
CustomShortcut {
name: "mediaToggle"
description: "Toggle media playback"