Web: der Sleep-Timer zählt und stoppt auch beim Radio
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
7c87343e66
commit
1533497409
1 changed files with 3 additions and 1 deletions
|
|
@ -453,6 +453,7 @@
|
||||||
this.leftMs = 0;
|
this.leftMs = 0;
|
||||||
setFade(1);
|
setFade(1);
|
||||||
pause();
|
pause();
|
||||||
|
stopRadio(); // the radio sleeps too (it plays in app.js's element)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (this.leftMs < FADE_MS) setFade(Math.max(this.leftMs / FADE_MS, 0.1));
|
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 && Date.now() - lastSaved > 10000) saveNow(id, true);
|
||||||
if (playing) skipOutro(id);
|
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();
|
if (playing || sleep.leftMs > 0) report();
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue