1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-24 21:42:51 -05:00

Fix media player positioning

fixes #235
This commit is contained in:
bbedward
2025-09-22 09:47:34 -04:00
parent 6a963ed618
commit 0a5f635a2d
3 changed files with 8 additions and 4 deletions

View File

@@ -10,7 +10,8 @@ Item {
property MprisPlayer activePlayer
property real value: {
if (!activePlayer || activePlayer.length <= 0) return 0
const calculatedRatio = (activePlayer.position || 0) / activePlayer.length
const pos = (activePlayer.position || 0) % Math.max(1, activePlayer.length)
const calculatedRatio = pos / activePlayer.length
return Math.max(0, Math.min(1, calculatedRatio))
}
property bool isSeeking: false