diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2025-07-15 11:14:33 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2025-07-15 11:14:33 +0800 |
| commit | 2e0e2c9b8b8f522320232ff641d8692e6198d2b5 (patch) | |
| tree | cf214e1bbcd3a26ddd2851b2ea763cad8455af33 /bar/Mpris.qml | |
| parent | 30fefa06237102a88e4c6d16dc86689a93b7024b (diff) | |
mpris: activeplayer can be null
Diffstat (limited to 'bar/Mpris.qml')
| -rw-r--r-- | bar/Mpris.qml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bar/Mpris.qml b/bar/Mpris.qml index f520b80..1f94e88 100644 --- a/bar/Mpris.qml +++ b/bar/Mpris.qml @@ -9,7 +9,7 @@ import qs.components Item { id: root readonly property MprisPlayer activePlayer: Services.Mpris.activePlayer - readonly property real progress: (activePlayer.positionSupported && activePlayer.lengthSupported && activePlayer.length > 0) ? activePlayer.position / activePlayer.length : 0 + readonly property real progress: (activePlayer?.positionSupported && activePlayer?.lengthSupported && activePlayer?.length > 0) ? activePlayer?.position / activePlayer?.length : 0 readonly property string cleanedTitle: cleanMusicTitle(activePlayer?.trackTitle) readonly property string state: activePlayer?.isPlaying ? Icons.media.pause : Icons.media.play |
