Files
Paperwall/web/templates/settings_rotation.html
T
Honey 15c7c38d86 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.
2026-07-22 00:07:25 +02:00

41 lines
1.6 KiB
HTML

{% extends "base.html" %}
{% block content %}
<h1>Rotation</h1>
<form method="post">
<div class="card">
<div class="section-label">Priority</div>
<label class="checkbox">
<input type="checkbox" name="navidrome_priority" {{ "checked" if navidrome_priority }}>
Navidrome takes over immediately whenever something is playing, regardless of rotation
</label>
</div>
<div class="card">
<div class="section-label">Rotation</div>
<label class="checkbox">
<input type="checkbox" name="rotation_enabled" {{ "checked" if rotation.enabled }}>
Enabled -- cycle through the screens below on a timer
</label>
<p class="hint" style="margin: 0.6rem 0 1.1rem;">
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>
<input type="text" id="screens" name="screens" value="{{ rotation.screens | join(', ') }}" placeholder="clock, weather">
<p class="hint">Comma-separated, in order. Available: {{ screens.keys() | join(', ') }}.</p>
</div>
<div class="field">
<label for="interval_minutes">Switch every (minutes)</label>
<input type="number" id="interval_minutes" name="interval_minutes" value="{{ rotation.interval_minutes }}" min="1">
</div>
</div>
<button type="submit">Save</button>
</form>
{% endblock %}