mirror of
https://github.com/Dispatcharr/Dispatcharr.git
synced 2026-07-17 16:50:53 +00:00
Fixes #940: Duplicate DVR task executions were caused by ClockedSchedule objects being shared across PeriodicTasks, triggering run_recording multiple times for the same recording. Added an idempotency guard in run_recording that exits early if status is already 'recording', 'completed', or 'stopped'. revoke_task() now deletes the PeriodicTask and orphaned ClockedSchedule on execution rather than relying on Celery revocation alone. Fixes #454: Added POST /api/channels/recordings/{id}/stop/ action that marks the recording as stopped and terminates only the specific DVR proxy client (identified via User-Agent: Dispatcharr-DVR/recording-{id}) without disrupting simultaneous recordings on the same or other channels. The API returns immediately; DVR client teardown and task revocation happen in a background thread to avoid 504 timeouts on the recordings list endpoint. Additional changes: - destroy() now only calls _stop_dvr_clients() for in-progress recordings, preventing accidental stream termination when deleting completed recordings - WebSocket events differentiated: recording_stopped, recording_cancelled (in-progress cancel), and recording_cancelled (delete) with was_in_progress flag so the frontend shows distinct "Recording deleted" vs "Recording cancelled" notifications - Frontend: Stop and Cancel split into separate buttons with confirmation modals; stopped recordings move immediately to Previously Recorded via optimistic status bucketing; removed dead 'Stopped' badge state - 27 new unit tests covering scheduling, idempotency, revocation, and DVR client isolation |
||
|---|---|---|
| .. | ||
| accounts | ||
| api | ||
| backups | ||
| channels | ||
| connect | ||
| dashboard | ||
| epg | ||
| hdhr | ||
| m3u | ||
| output | ||
| plugins | ||
| proxy | ||
| vod | ||