diff --git a/Plugin/unraid/pages/arrs.php b/Plugin/unraid/pages/arrs.php index aeb8695..d01ab3c 100644 --- a/Plugin/unraid/pages/arrs.php +++ b/Plugin/unraid/pages/arrs.php @@ -374,6 +374,18 @@ function _syncSection(sync, recovery, settings) { `; } +// Local, because there is no global one. js/varaverk.js provides _relTime, _sz, _n and _uptime — +// and _uptime floors to whole minutes, so a 33-second cleanup would render as "0m". Same shape the +// rsync page uses for the same reason; if a third page needs it, that is the point to promote it +// to the shared file rather than keep a third copy. +function _dur(s) { + if (!s) return '—'; + const h = Math.floor(s / 3600), m = Math.floor((s % 3600) / 60), sec = s % 60; + if (h) return h + 'h ' + m + 'm'; + if (m) return m + 'm ' + sec + 's'; + return sec + 's'; +} + // ── Media jobs ──────────────────────────────────────────────────────────────── // Play state sync, permissions and the cleaner. They work on the same files the arrs manage and // appeared in no tab at all — the only way to know whether one had run was to open the Scheduler