Add eager caching system for series data#286
Closed
firestaerter3 wants to merge 208 commits intoKevinjil:masterfrom
Closed
Add eager caching system for series data#286firestaerter3 wants to merge 208 commits intoKevinjil:masterfrom
firestaerter3 wants to merge 208 commits intoKevinjil:masterfrom
Conversation
What is working: - Get VOD stream information - Stream VOD - Get IPTV stream information - Stream IPTV - Get Series stream information - Stream Series
Include generation of a plugin repository using GitHub pages.
Bump action version.
Restore the build action in the publish workflow.
Configuration is only possible via the XML document. No interface for the configuration has been written. The current state only lists the channels with pictures and is able to play the stream. Program guide is not implemented.
Change build target to Jellyfin v10.8.* release.
As discussed in https://matrix.to/#/!YOoxJKhsHoXZiIHyBG:matrix.org/$_1Kg-ItNzX51As5ERcRNjrMfWYmA6z15B9YeQowKWxc the functionality is not availabe for Jellyfin plugins.
Feature/restreaming
For some reason, content is not shown in the folders when the folder type is set. This requires additional debugging at a later moment.
Removing them forces Jellyfin to use the metadata provider to get correct season and episode images
This allows for faster buffering and transcode starting, as the upstream server often sends some buffered data before the clients connect.
The error handler ignores deserialization errors on nullable properties. We can mark all properties which are not strictly neccessary for the functionality of this plugin as nullable, and improve the user experience by having less failures in loading content. We might have to refactor the xtream client to include logging, as errors are now silently ignored.
No functional changes intended with this commit.
No functional changes intended.
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 5 to 6. - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](actions/download-artifact@v5...v6) --- updated-dependencies: - dependency-name: actions/download-artifact dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
Dependency Injection was smart enough to insert a http client, s.t. our implementation for creating one was never called. Remove the constructor and make the plugin responsible of initializing the user agent.
In Jellyfin 10.11.x, `Live TV` is no longer displayed under the category. The upstream repository uses `LiveTV`, so let's try that and see if it ends up on the correct category.
Bumps [shogo82148/actions-upload-release-asset](https://github.com/shogo82148/actions-upload-release-asset) from 1.9.1 to 1.9.2. - [Release notes](https://github.com/shogo82148/actions-upload-release-asset/releases) - [Commits](shogo82148/actions-upload-release-asset@v1.9.1...v1.9.2) --- updated-dependencies: - dependency-name: shogo82148/actions-upload-release-asset dependency-version: 1.9.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 6 to 7. - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](actions/download-artifact@v6...v7) --- updated-dependencies: - dependency-name: actions/download-artifact dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
Pre-fetches and caches all series, seasons, and episodes data at plugin startup, enabling instant browsing without waiting for API calls. ## Features ### Core Caching - New SeriesCacheService for managing cached series data - Configurable cache enable/disable toggle - Background cache refresh with progress logging - Automatic cache population on plugin startup ### Database Synchronization - Delta-based sync: only adds/updates/removes changed items - Populates Jellyfin database after cache refresh - Clear Cache button triggers proper Jellyfin DB cleanup ### Scheduled Refresh - Configurable auto-refresh interval (default: 60 minutes) - Manual refresh via UI button - Scheduled task integration for periodic updates ### Error Handling - RetryHandler for transient API failures - FailureTrackingService to skip consistently failing series - Graceful degradation when cache is unavailable ### UI Updates - Cache refresh button with progress display - Enable/disable caching checkbox - Refresh interval configuration - Fixed authentication headers for refresh API calls ## Dependencies **This PR must be merged AFTER PR #283 (Flat View)** because: - Both modify SeriesChannel.cs and Plugin.cs - Caching integrates with flat view data retrieval - Merging out of order will cause conflicts **Merge order:** PR #283 → this PR ## Files Changed (14 files) - New: SeriesCacheService.cs, FailureTrackingService.cs, RetryHandler.cs - New: Tasks/SeriesCacheRefreshTask.cs - Modified: Plugin.cs, PluginConfiguration.cs, SeriesChannel.cs - Modified: PluginServiceRegistrator.cs, TaskService.cs, StreamService.cs - Modified: XtreamController.cs, Xtream.js, XtreamSeries.html, XtreamSeries.js ## Testing - Tested with 200+ series library - Verified delta sync only updates changed items - Confirmed cache survives plugin restarts - Tested manual and scheduled refresh ## Backward Compatibility - Caching disabled by default - Existing functionality unchanged when disabled - Opt-in feature via configuration
1ed6223 to
63213bc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Pre-fetches and caches all series data at plugin startup for instant browsing. Also includes TVDb metadata integration for improved artwork.
Dependencies
Features
Core Caching
SeriesCacheServicefor managing cached series dataDatabase Synchronization
Scheduled Refresh
TVDb Metadata Integration
SeriesTitle=TVDbID(one per line in config)Error Handling
RetryHandlerfor transient API failuresFailureTrackingServiceto skip consistently failing seriesUI Updates
Files Changed (14 files)
New files:
Service/SeriesCacheService.cs- Core caching service with TVDb lookupService/FailureTrackingService.cs- Track failing seriesService/RetryHandler.cs- HTTP retry logicTasks/SeriesCacheRefreshTask.cs- Scheduled refresh taskModified files:
Plugin.cs- Initialize cache servicePluginConfiguration.cs- Cache and TVDb settingsSeriesChannel.cs- Use cached dataPluginServiceRegistrator.cs- DI registrationTaskService.cs- Task managementStreamService.cs- Logging improvementsXtreamController.cs- Cache API endpointsXtream.js,XtreamSeries.html,XtreamSeries.js- UITesting
Backward Compatibility