Make manual pin permanent instead of a 5-minute timeout
"Show X now" now persists indefinitely (survives restarts too, it's in config.json) instead of auto-expiring back to rotation after 5 minutes. Implemented by reusing the existing rotation.enabled flag rather than a separate scheduler-side timer: pinning a screen sets rotation.enabled=False and records which screen in a new pinned_screen config field. Re-enabling rotation -- either the "Resume automatic" button or just checking "Enabled" again on the Rotation settings page -- clears the pin and resumes normal cycling either way. Navidrome priority is unchanged: still checked first, still preempts a pin the instant something's playing, same as it already preempted rotation. Verified end-to-end: pin persists across many scheduler ticks (previously would have reverted after 5 min), both resume paths (button and settings checkbox) clear it correctly.
This commit is contained in:
1 parent
c0192fca7a
commit
15c7c38d86
4 files changed
+49
-25
No files matched your search
@@ -22,9 +22,9 @@
|
||||
<span class="badge {{ 'on' if rotation.enabled else 'off' }}">{{ "on" if rotation.enabled else "off" }}</span>
|
||||
{{ rotation.screens | join(" → ") }} (every {{ rotation.interval_minutes }} min)
|
||||
</dd>
|
||||
{% if status.manual_screen %}
|
||||
{% if status.pinned_screen %}
|
||||
<dt>Manual pin</dt>
|
||||
<dd><span class="badge on">{{ screens[status.manual_screen].display_name }}</span> until {{ status.manual_until }}</dd>
|
||||
<dd><span class="badge on">{{ screens[status.pinned_screen].display_name }}</span> -- fixed until resumed</dd>
|
||||
{% endif %}
|
||||
</dl>
|
||||
</div>
|
||||
@@ -40,7 +40,7 @@
|
||||
<button class="secondary" type="submit">Show {{ screen.display_name }}</button>
|
||||
</form>
|
||||
{% endfor %}
|
||||
{% if status.manual_screen %}
|
||||
{% if status.pinned_screen %}
|
||||
<form class="inline" method="post" action="{{ url_for('resume_rotation') }}">
|
||||
<button class="secondary" type="submit">Resume automatic</button>
|
||||
</form>
|
||||
|
||||
@@ -18,10 +18,11 @@
|
||||
Enabled -- cycle through the screens below on a timer
|
||||
</label>
|
||||
<p class="hint" style="margin: 0.6rem 0 1.1rem;">
|
||||
Off just pins to the first screen in the order below (still shown when
|
||||
Navidrome priority is on but nothing's playing). "Show X now" buttons on
|
||||
the Status page still work either way, they just don't stick past the
|
||||
next check.
|
||||
Clicking "Show X now" on the Status page turns this off automatically
|
||||
and fixes the display to that screen until you turn rotation back on
|
||||
here (Navidrome priority above still applies on top of a pin, if
|
||||
enabled). With no pin and rotation off, it just sits on the first
|
||||
screen in the order below.
|
||||
</p>
|
||||
<div class="field">
|
||||
<label for="screens">Order</label>
|
||||
|
||||
Reference in new issue
Block a user