feat: Add timed IPTV playlist and EPG updates #3

Open
crashmedia wants to merge 0 commits from feature/iptv-update-scheduler into main
Owner

Summary

Add background update scheduler for IPTV playlists and EPG data that continues running even when the app is closed.

Changes

Config (crashfin-core/src/config.rs)

  • Add IptvUpdateInterval enum with presets (8h, 24h, 48h) and custom interval
  • Add iptv_update_interval and iptv_last_update fields to Config

Scheduler (crashfin-xtream/src/scheduler.rs)

  • New UpdateScheduler struct with cancellation token support
  • Background task that performs periodic updates at configured interval
  • Initial update on startup

IPC Methods (src/main.rs)

  • setIptvUpdateInterval - Configure update frequency (8h/24h/48h/custom)
  • getIptvUpdateInterval - Get current interval settings
  • triggerIptvUpdate - Manually trigger an immediate update
  • getIptvUpdateStatus - Check if scheduler is running

UI (ui/js/components/settings-panel.js)

  • Added "IPTV Updates" section in settings panel
  • Interval selection dropdown (8h/24h/48h)
  • Auto-update toggle

Background Updates

The scheduler uses tokio_util::sync::CancellationToken to allow graceful shutdown and supports:

  • Configurable update intervals
  • Immediate trigger via IPC
  • Status monitoring
  • EPG cache refresh integration

Closes #XXX

## Summary Add background update scheduler for IPTV playlists and EPG data that continues running even when the app is closed. ## Changes ### Config (`crashfin-core/src/config.rs`) - Add `IptvUpdateInterval` enum with presets (8h, 24h, 48h) and custom interval - Add `iptv_update_interval` and `iptv_last_update` fields to Config ### Scheduler (`crashfin-xtream/src/scheduler.rs`) - New `UpdateScheduler` struct with cancellation token support - Background task that performs periodic updates at configured interval - Initial update on startup ### IPC Methods (`src/main.rs`) - `setIptvUpdateInterval` - Configure update frequency (8h/24h/48h/custom) - `getIptvUpdateInterval` - Get current interval settings - `triggerIptvUpdate` - Manually trigger an immediate update - `getIptvUpdateStatus` - Check if scheduler is running ### UI (`ui/js/components/settings-panel.js`) - Added "IPTV Updates" section in settings panel - Interval selection dropdown (8h/24h/48h) - Auto-update toggle ## Background Updates The scheduler uses `tokio_util::sync::CancellationToken` to allow graceful shutdown and supports: - Configurable update intervals - Immediate trigger via IPC - Status monitoring - EPG cache refresh integration Closes #XXX
feat: Add timed IPTV playlist and EPG updates
Some checks failed
CI / Check & Test (pull_request) Failing after 1m49s
f2a2e84d7b
- Add IptvUpdateInterval enum to config (8h, 24h, 48h, custom)
- Add iptv_update_interval and iptv_last_update fields to Config
- Create UpdateScheduler for background updates with cancellation
- Add IPC methods: setIptvUpdateInterval, getIptvUpdateInterval,
  triggerIptvUpdate, getIptvUpdateStatus
- Start scheduler on app startup
- Add IPTV Updates section to settings panel UI
- Add tokio-util dependency for CancellationToken support
Some checks failed
CI / Check & Test (pull_request) Failing after 1m49s
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feature/iptv-update-scheduler:feature/iptv-update-scheduler
git switch feature/iptv-update-scheduler

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff feature/iptv-update-scheduler
git switch feature/iptv-update-scheduler
git rebase main
git switch main
git merge --ff-only feature/iptv-update-scheduler
git switch feature/iptv-update-scheduler
git rebase main
git switch main
git merge --no-ff feature/iptv-update-scheduler
git switch main
git merge --squash feature/iptv-update-scheduler
git switch main
git merge --ff-only feature/iptv-update-scheduler
git switch main
git merge feature/iptv-update-scheduler
git push origin main
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
crashmedia/crashfin!3
No description provided.