From 1533497409feae1e1b487693a795dba8081c1594 Mon Sep 17 00:00:00 2001 From: mrwnslz Date: Fri, 2 Oct 2026 13:16:24 +0200 Subject: [PATCH] =?UTF-8?q?Web:=20der=20Sleep-Timer=20z=C3=A4hlt=20und=20s?= =?UTF-8?q?toppt=20auch=20beim=20Radio?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 --- static/js/podcasts-web.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/static/js/podcasts-web.js b/static/js/podcasts-web.js index 075b08c..a6b2df1 100644 --- a/static/js/podcasts-web.js +++ b/static/js/podcasts-web.js @@ -453,6 +453,7 @@ this.leftMs = 0; setFade(1); pause(); + stopRadio(); // the radio sleeps too (it plays in app.js's element) return; } if (this.leftMs < FADE_MS) setFade(Math.max(this.leftMs / FADE_MS, 0.1)); @@ -758,7 +759,8 @@ if (playing && Date.now() - lastSaved > 10000) saveNow(id, true); if (playing) skipOutro(id); } - sleep.tick(playing); + // The sleep timer counts while either plays (radio and podcasts share the player). + sleep.tick(playing || radioPlaying()); if (playing || sleep.leftMs > 0) report(); }, 1000);