feat(dvr): series recording improvements — immediate EPG scan, once-rule cleanup, defaults#1142
feat(dvr): series recording improvements — immediate EPG scan, once-rule cleanup, defaults#1142Grimothy wants to merge 9 commits into
Conversation
When a series rule is created or transitioned from disabled to enabled, scheduleRuleImmediately() now scans the full EPG (configurable via dvr.initial_lookahead_days, default 14 days) instead of the 30-minute lookahead window used by the regular tick. Users now see upcoming scheduled recordings immediately after creating a rule. - Add DvrSchedulerService::scheduleRuleImmediately() that calls matchRule() with a 14-day lookahead - Add DvrRecordingRule::created() hook to trigger immediate scheduling for enabled Series rules on creation - Add DvrRecordingRule::saving() enabled-transition detection to trigger immediate scheduling when a rule goes from disabled → enabled - Add dvr.initial_lookahead_days config (env DVR_INITIAL_LOOKAHEAD_DAYS, default 14) - Add Pest tests for both creation and re-enablement scenarios
…ing defaults - Delete once-rules after post-processing completes (not just disable) - Delete once-rules on user cancel in DvrRecorderService::cancel() - Delete once-rules in PostProcessDvrRecording early return for cancelled recordings - Add default_series_mode and default_series_keep_last to DvrSetting - Add Series Recording Defaults section to playlist DVR settings - Use series defaults when creating rules via BrowseShows quick actions - Add include_disabled_channels toggle to playlist DVR settings - Extend EPG programme population lookahead to 30 days - Add env() wrappers to config/cache, database, queue, session for local dev - Revert broadcasting.php and reverb.php to original (remove APP_KEY fallback) - Add reverb:start to composer dev script
# Conflicts: # config/dev.php
|
@sparkison --- what do you need me to fix? |
There are a few things that need to be addressed before this can merge, grouped by severity below. 🔴 Critical — Config File RegressionsThese config files have intentionally hard-coded values to ensure correct behavior in the Docker setup. Making them env-readable allows users to inadvertently break things by setting (or not setting)
|
|
@Grimothy, I think once the config files are rolled back the tests will pass again too. |
|
Addressed review feedback and pushed updates to DVR-Fixes. Fixes included:
DVR include-disabled toggle is now honored end-to-end:
Test updates:
Validation run:
All above are passing locally after the changes. |
…channels table Root cause: Channel::factory()->for(->playlist)->create() evaluates the nested Playlist::factory() in the factory definition, creating an extra Playlist record that triggers ProcessM3uImport via the PlaylistCreated event. With QUEUE_CONNECTION=sync, this runs inline during the test, interfering with test data. Additionally, ChannelScrubber::create() triggers its creating event (overwriting uuid with auto-generated value) and created event (dispatching ProcessChannelScrubber which overwrites uuid again). With sync queue, by the time the test reads ->scrubber->uuid, the DB has a different value, causing the batch UUID guard in ProcessChannelScrubberChunk::handle() to bail early. Fix: Pass IDs directly (playlist_id, user_id, group_id) in the create array to avoid nested factory evaluation. Use ChannelScrubber::createQuietly() to prevent the created event from dispatching ProcessChannelScrubber that overwrites the uuid.
PostgreSQL uuid column rejects the plain string 'test-batch-uuid'. Use a properly formatted UUID to satisfy the column type constraint, while keeping createQuietly() to prevent ProcessChannelScrubber from overwriting the uuid.
…sTest Same pattern as ProcessChannelScrubberChunkTest fix: pass foreign key IDs directly instead of using ->for() to avoid nested Playlist::factory() evaluation that creates extra Playlists and triggers ProcessM3uImport, which leaks notifications and violates Notification::fake().
Changes
Two feature commits on top of latest
upstream/devmerge:✨ Delete once-rules on completion and cancel, add series recording defaults (
7a99acbe)⚡ Immediate EPG scan when series rule is created or re-enabled (
df54776e)Base
Merged with
upstream/devat30f67c36.