udpate stuff

This commit is contained in:
2026-06-11 09:48:17 -07:00
parent 6bd80a0b3a
commit a2df93097a
14 changed files with 294 additions and 26 deletions

View File

@@ -32,9 +32,11 @@ export default function App() {
useEffect(() => {
fetchStatus();
fetchChannels();
const interval = setInterval(fetchStatus, 5000);
// Poll faster while transitioning so the UI updates promptly
const rate = status?.transitioning ? 1000 : 5000;
const interval = setInterval(fetchStatus, rate);
return () => clearInterval(interval);
}, [fetchStatus, fetchChannels]);
}, [fetchStatus, fetchChannels, status?.transitioning]);
const handleSourceChanged = () => {
fetchStatus();
@@ -50,7 +52,7 @@ export default function App() {
return (
<div className="app">
<Player />
<Player live={status?.live ?? false} />
<StatusBar status={status} />
<div className="controls">
<AdminPanel
@@ -60,7 +62,7 @@ export default function App() {
/>
<ChannelList
channels={channels}
activeChannel={status?.channelName ?? ""}
activeChannel={status?.channel_name ?? ""}
onRefresh={handleChannelRefresh}
/>
</div>