workspace view rework

This commit is contained in:
2025-07-30 23:21:13 +01:00
parent 9d65cb0d58
commit 92636a2dde
13 changed files with 285 additions and 15 deletions

View File

@@ -31,9 +31,11 @@ Singleton {
property string lastActivePlayerIdentify: "";
onReloaded: {
root.setActivePlayerFromIdentity(lastActivePlayerIdentify)
root.updateActiveTrackPosition()
}
onLoaded: {
root.setActivePlayerFromIdentity(lastActivePlayerIdentify)
root.updateActiveTrackPosition()
}
}
@@ -166,6 +168,15 @@ Singleton {
this.activePlayer = player;
}
function setActivePlayerFromIdentity(identify: string) {
for (x in root.mpris.players) {
if (x.identify == identify) {
this.activePlayer = x
return
}
}
}
Timer {
// only emit the signal when the position is actually changing.
running: root.activePlayer.playbackState == MprisPlaybackState.Playing