timothy and Claude Opus 4.8
764cd3c31b
feat(380): extract shuffle-source construction to ShuffleSourceBuilder
...
Eliminate the one cross-engine reach-in in the scheduler: PlaylistEnumerator called
PlayoutBuilder.GetGroupedMediaItemsForShuffle / GetCollectionItemsForShuffleInOrder as
statics (one engine reaching into another engine's class). Move both helpers verbatim to
a new public static ShuffleSourceBuilder in ErsatzTV.Core/Scheduling (sibling to the
also-static MultiCollectionGrouper / MultiPartEpisodeGrouper; deps passed as parameters,
not DI). Classic (PlayoutBuilder) and Playlist (PlaylistEnumerator) now share this one
place to build shuffle sources.
One intentional signature change: GetGroupedMediaItemsForShuffle takes
(bool keepMultiPartEpisodesTogether, bool treatCollectionsAsShows) instead of a
ProgramSchedule (verified those are the only two properties it read). This deletes
PlaylistEnumerator's fake `new ProgramSchedule { KeepMultiPartEpisodesTogether = false }`
(its TODO becomes an honest false, false) and gives callers without a ProgramSchedule
(#176 , #70 ) a schedule-entity-free entry point.
Scope is deliberately (a)-only: engine separation preserved, no god-factory. Block stays
its own family; the Scripted/YAML construction duplication is a separate follow-up gated
on #381 . See docs/decisions.md 2026-07-17.
Behavior-preserving: the characterization net added in the previous commit (classic-shuffle
golden byte-identical, PlaylistEnumerator reach-in sequence unchanged) plus new direct
ShuffleSourceBuilder unit tests (multi-collection vs fake-multi-collection lookup;
multi-part grouping on/off) all green. Full Core.Tests: 546 passed. PlayoutBuilder.cs
also de-BOM'd + whitespace-normalized per the fix-as-you-touch convention (#311 ).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com >
2026-07-17 08:48:05 +02:00
Jason Dove
2ad6547349
scheduler context improvements ( #2819 )
...
* improve classic scheduling context display
* add basic block scheduling context
* add scheduling context to classic filler
* improve parsing
2026-02-09 20:19:52 -06:00
Jason Dove
4fa11b6943
add scheduling context to playout details table ( #2817 )
...
* add scheduling context to playout details table
* fix missing context copies
2026-02-05 13:45:05 -06:00
Jason Dove
440d9f708e
improve shuffle stability when reset ( #2816 )
2026-02-05 12:03:16 -06:00
Jason Dove
f1072b70c7
add chapter title to filler expression ( #2803 )
...
* fix transcoding tests
* pass chapter title to filler expression
* update changelog
2026-01-27 09:40:38 -06:00
Jason Dove
cd2bb0f2e0
fix playout build failures due to playlist enumerator access ( #2801 )
2026-01-26 14:44:07 -06:00
Jason Dove
e80f687612
add marathon group by director ( #2800 )
2026-01-26 09:10:01 -06:00
Jason Dove
317ca1967c
fix building playouts when fill with group mode is used with graphics elements ( #2799 )
2026-01-25 15:29:18 -06:00
Jason Dove
08ceb53b2b
make count an expression in classic schedules ( #2794 )
...
* make count an expression in classic schedules
* add tests
2026-01-20 09:50:45 -06:00
Jason Dove
effb96a2c2
alternate schedule and template consistency ( #2757 )
...
* refactor classic and block schedules to use same alternate schedule selector
* handle start year and end year
* add migrations for classic and block schedules
* allow editing block template start and end year
* add tests that include years
* add date range editing to classic (alternate) schedules
* fix running tests locally
* restore media files load; needed for local folder scanners
* update changelog
* feedback
2026-01-06 12:51:07 -06:00
Jason Dove
1b72b8491c
improve multi-episode grouping logic ( #2744 )
2025-12-31 11:24:07 -06:00
Jason Dove
9fea25a77d
allow string values for count instruction in sequential schedules ( #2741 )
...
* allow string values for count instruction in sequential schedules
* fix potential div by zero
2025-12-30 18:19:33 -06:00
Jason Dove
2f0cd1eb6c
update dependencies ( #2726 )
2025-12-19 13:56:26 -06:00
Jason Dove
038286c92b
use playlist item count when playlists are used as filler ( #2716 )
...
* use playlist item count when playlists are used as filler
* expand test
2025-12-10 22:14:07 -06:00
Jason Dove
72dc401829
fix chronological sorting for other videos ( #2699 )
2025-12-03 10:38:29 -06:00
Jason Dove
ec0d8ea6ac
work around sequential schedule validation limit ( #2655 )
...
* remove readalltext
* remove unused method
* remove fileexists
* remove folderexists
* remove readalllines
* remove fake local file system
* show playlist name in playout build errors
* add basic sequential schedule validator tests
* work around sequential schedule validation limit
2025-11-24 12:08:43 -06:00
Jason Dove
3cb84c2491
refresh classic playouts by default ( #2647 )
2025-11-15 20:45:28 -06:00
Jason Dove
21f4439aa4
block ui improvements ( #2646 )
...
* template editor improvements
* more keyboard navigation
* replace template tree view with template table
2025-11-13 19:25:44 -06:00
Jason Dove
b6d509b9cd
add search query collection type to block schedules ( #2644 )
...
* add search query collection type to block schedules
* fix history
2025-11-13 10:48:04 -06:00
Jason Dove
6603500132
fix content_total_duration in graphics engine ( #2643 )
2025-11-12 20:07:54 -06:00
Jason Dove
48b1aa3e64
fix block playout build bug ( #2642 )
2025-11-12 16:53:06 -06:00
Jason Dove
bc400de94c
clear custom title when stopping guide group in scripted schedule ( #2622 )
2025-11-10 08:51:34 -06:00
Jason Dove
629b3d7d9f
fix effective block tests ( #2600 )
...
* fix effective block tests running on github
* update dependencies
* pass tz again
* use tzconvert for time zones in tests
* temporary logging
* maybe fix
* test cleanup
2025-11-05 06:48:49 -06:00
Jason Dove
453737a521
add custom_title to start_epg_group ( #2599 )
2025-11-04 16:08:07 -06:00
Jason Dove
dd38ba19ea
add collection type search query ( #2598 )
2025-11-04 12:22:41 -06:00
Jason Dove
89133255d3
fix classic schedule start time calculation across a UTC offset change ( #2593 )
...
* fix classic schedule start time calculation across a UTC offset change
* update changelog
2025-11-02 09:38:18 -06:00
Jason Dove
4822ba5486
fix block start time calculation ( #2587 )
2025-11-01 20:16:04 -05:00
Jason Dove
5045a411b1
fix sequential schedule building across offsets ( #2584 )
2025-10-31 09:20:09 -05:00
Jason Dove
727a978689
fix block history and smart_collection search bugs ( #2579 )
...
* fix block history when using mirror offset
* fix smart_collection search crashes
2025-10-29 14:01:14 -05:00
Jason Dove
e851a295a6
fix scripted schedule building across offsets ( #2569 )
2025-10-26 09:07:21 -05:00
Jason Dove
1f8834c280
block playout fixes; hls direct fixes ( #2566 )
...
* fix block playout builder with empty collection
* fix hls direct when selecting audio
* allow embedded subtitles with hls direct
2025-10-25 06:35:56 -05:00
Jason Dove
e089b12c2b
trakt list fixes ( #2560 )
...
* show reset playout build failures
* fix scheduling trakt list playlists that contain shows
2025-10-23 11:15:55 -05:00
Jason Dove
ba5a027525
reduce playout log spam ( #2543 )
2025-10-18 08:59:17 -05:00
Jason Dove
144b3fe80b
fix remote stream durations in playouts ( #2515 )
2025-10-11 08:30:24 -05:00
Jason Dove
3e8ac9914c
refactor playout build errors ( #2480 )
...
* refactor classic playout builds
* refactor sequential playout builds
* refactor block playout building
* don't fail building an empty block schedule
* fix scripted playout build errors
2025-10-02 13:36:39 -05:00
Jason Dove
598de5d5d6
add playout build status ( #2476 )
...
* add playout build status
* show build status in playout list
* update changelog
2025-10-01 21:40:39 -05:00
Jason Dove
1763c897eb
fix filler expression with playlists ( #2464 )
2025-09-29 14:05:27 -05:00
Jason Dove
18523dce64
add scripted playout timeout setting ( #2456 )
...
* add setting for scripted playout build timeout
* update dependencies
2025-09-25 02:33:49 +00:00
Jason Dove
788a1ecdc4
add deco break content ( #2446 )
...
* add initial models
* migrations
* edit break content mode
* add and remove break content from ui
* use autocompletes in deco editor
* save break content to db
* allow break content playlists
* refactor default filler build
* fix slow startup
* start to implement adding break content
* use clone; try to fix block breaks
* fix updating history
* use consistent removebefore values
* cleanup logging
* only allow playlist break content
* update changelog
2025-09-19 18:48:51 +00:00
Jason Dove
f26e48c063
block schedules: skip items and collections that will never fit ( #2433 )
...
* add first block playout builder test
* block schedules: skip items and collections that will never fit
2025-09-17 13:53:50 +00:00
Jason Dove
9aa7c44388
add watermarks and graphics elements to block items ( #2424 )
2025-09-16 02:39:25 +00:00
Jason Dove
245165c9d9
add rerun collection type ( #2421 )
...
* rename collection type
* split collections into separate pages
* add rerun collection types, migration, editor
* add rerun to classic schedule items
* rerun plumbing in classic playout builder
* start to implement rerun enumerator
* add scheduledAt to enumerator movenext
* maintain rerun history in db
* fix shuffle
* fix rerun allowed playback orders
* fix updating rerun collections
* update changelog; fix editing
* update changelog
2025-09-15 18:27:55 +00:00
Jason Dove
64bb1b0d61
fix classic schedule flood bug ( #2414 )
...
* clean up some logging
* fix classic schedule flood bug
2025-09-14 02:36:50 +00:00
Jason Dove
17c7774603
add playlist item count and shuffle playlist items ( #2407 )
...
* marathon cleanup
* add playlist item count, and shuffle playlist items
2025-09-12 14:19:05 +00:00
Jason Dove
bd6954121f
log api requests ( #2404 )
2025-09-10 00:50:03 +00:00
Jason Dove
6b275f8a13
fix hwaccel health check on mobile ( #2401 )
...
* fix hw accel health check on mobile
* allow classic schedules to fast forward
2025-09-09 16:57:49 +00:00
Jason Dove
0d69dd58a4
add classic schedule marathon ( #2400 )
2025-09-09 15:38:07 +00:00
Jason Dove
79e8fa0877
ignore specials when using season, episode order ( #2399 )
2025-09-08 15:12:51 +00:00
Jason Dove
d8e8abb691
channel mirror validation improvements ( #2396 )
...
* improve channel mirror validation
* fix playout offset
2025-09-08 01:12:58 +00:00
Jason Dove
e9093d0c48
fix block playout build crash from empty collections ( #2395 )
2025-09-08 00:42:02 +00:00