From 31c484b041fdc686d37b81005750c3b880734cc9 Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Sun, 19 Apr 2026 20:02:50 +1000 Subject: [PATCH] fix: wrap media position by length (#1410) --- modules/dashboard/Media.qml | 4 ++-- modules/dashboard/dash/Media.qml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/dashboard/Media.qml b/modules/dashboard/Media.qml index 22ed204b..ccb5f0c4 100644 --- a/modules/dashboard/Media.qml +++ b/modules/dashboard/Media.qml @@ -27,7 +27,7 @@ Item { property real playerProgress: { const active = Players.active; - return active?.length ? active.position / active.length : 0; + return active?.length ? (active.position % active.length) / active.length : 0; } function lengthStr(length: int): string { @@ -354,7 +354,7 @@ Item { anchors.left: parent.left - text: root.lengthStr(Players.active?.position ?? -1) + text: root.lengthStr(Players.active ? Players.active.position % Players.active.length : -1) color: Colours.palette.m3onSurfaceVariant font.pointSize: Tokens.font.size.small } diff --git a/modules/dashboard/dash/Media.qml b/modules/dashboard/dash/Media.qml index 777a24b9..b8e78abd 100644 --- a/modules/dashboard/dash/Media.qml +++ b/modules/dashboard/dash/Media.qml @@ -11,7 +11,7 @@ Item { property real playerProgress: { const active = Players.active; - return active?.length ? active.position / active.length : 0; + return active?.length ? (active.position % active.length) / active.length : 0; } anchors.top: parent.top