From bf6981948a808e29eba6b163870f23d5f0e40b1b Mon Sep 17 00:00:00 2001 From: Sanapach Date: Thu, 19 Nov 2026 21:16:29 +0200 Subject: [PATCH] Refresh podcast counters when an episode changes status Playing, completing or restarting an episode from the player updated its row but left the unplayed and in-progress counters of the podcast page as they were loaded. Co-Authored-By: Claude Opus 5.5 --- templates/player/scripts.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/templates/player/scripts.html b/templates/player/scripts.html index cc7f1e9..e022339 100644 --- a/templates/player/scripts.html +++ b/templates/player/scripts.html @@ -3675,6 +3675,8 @@ document.addEventListener('alpine:init', () => { // The player reported progress for an episode shown here. const episode = this.episodes.find(item => item.episode_id === episodeId); if (!episode || !data?.status) return; + // Unplayed and in-progress counters of the page change with it. + if (episode.status !== data.status) this.loadDetail(); episode.status = data.status; episode.position_ms = Number(data.position_ms || 0); episode.resume_position_ms = data.status === 'in_progress' ? episode.position_ms : 0;