Commit Graph
3 Commits
Author SHA1 Message Date
fraujulianandClaude Opus 5.5 497ac8fd6c fix: start each schedule item at its planned time
Start played the first item right away, although the plan begins at
the next full hour. The news was at :00 and :30 in the plan but not on
the real clock.

PlaybackEngine now takes a clock and waits before each item until its
planned start. An item that runs late is never cut; the next one then
starts right after it. When the broadcast starts after the plan has
begun, items that should already have started are skipped and playback
joins at the next one.

While the engine waits for the first item, the now-playing card shows
"On air at" with the planned time. Starting a plan that is already
over is refused with a message.

Refs #12

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 11:20:10 +01:00
fraujulianandClaude Opus 5.5 667501e805 feat: add song requests with hot swap
A listener request can now replace any upcoming item in the schedule,
also while the broadcast is running. The user picks a song from the
library, selects a row in the timeline and clicks "Play instead of
selected".

ScheduleGenerator.Replace puts the song at that position and rebuilds
only the rest of its half hour. Filler goes before the songs, so the
last song still ends exactly when the next news starts. Items before
the swap and all later half hours stay as they were. The filler budget
counts the ads and talk already planned earlier in that half hour, and
an ad never follows another ad.

PlaybackEngine.ReplaceUpcoming switches the running engine to the new
plan. It refuses when the item has already started, and the engine
reads each next item under a lock, so a swap cannot hit an item that
is just going on air.

The timeline marks the item on air with a play icon instead of
selecting it, so the selection is free for the swap target. A hint
next to the button says why a row cannot be replaced (news, already
played, no song chosen).

Refs #11

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 11:10:38 +01:00
fraujulianandClaude Opus 5.5 7f9ed339e7 feat: add schedule and now-playing page
The new Schedule page lets the user choose 1 to 24 hours and create a
plan that starts at the next full hour. The timeline lists start time,
type, title and duration. Each type has a labelled chip: news,
ads and moderator segments get their own border color, songs stay
neutral because the accent color can be the same red as the news.

A now-playing card shows the current item with progress, elapsed and
planned time, Start and Stop buttons and a volume slider. The current
row is selected and scrolled into view. Errors from the generator and
skipped items appear in an InfoBar.

ScheduleController creates the plan from the library and drives the
PlaybackEngine. It lives on App for the whole app run, so a broadcast
keeps playing while the user switches pages, and it stops on exit.

Refs #10

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 11:01:28 +01:00