mirror of
https://github.com/tubearchivist/tubearchivist-jf-plugin.git
synced 2026-03-23 20:37:14 +00:00
[PR #63] feat: Add collection caching for improved performance #76
Labels
No labels
bug
enhancement
pull-request
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
tubearchivist/archived-tubearchivist-jf-plugin#76
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/tubearchivist/tubearchivist-jf-plugin/pull/63
Author: @mattkduran
Created: 10/17/2025
Status: 🔄 Open
Base:
master← Head:feat/collection-caching📝 Commits (3)
c0bafbbfeat: Add collection caching for improved performance0377810fix: Ensure collection cache uses correct value on config changeb05ae0crefactor: Rename JFTASync to JFTAProgressSync for consistency in configuration📊 Changes
4 files changed (+282 additions, -51 deletions)
View changed files
📝
Jellyfin.Plugin.TubeArchivistMetadata/Configuration/PluginConfiguration.cs(+24 -4)📝
Jellyfin.Plugin.TubeArchivistMetadata/Configuration/configPage.html(+5 -5)📝
Jellyfin.Plugin.TubeArchivistMetadata/Plugin.cs(+252 -41)📝
Jellyfin.Plugin.TubeArchivistMetadata/Tasks/JFToTubeArchivistProgressSyncTask.cs(+1 -1)📄 Description
Problem
The current implementation performs 3 database lookups (
GetItemById) for every playback event to validate if content belongs to the TubeArchivist collection. This creates unnecessary overhead, especially when playing non-TubeArchivist content like movies or music.Solution
Cache the TubeArchivist collection GUID once at startup and use it for O(1) validation checks.
Changes
Added collection ID caching:
_tubeArchivistCollectionIdfield stores the cached GUIDCacheTubeArchivistCollectionId()finds and caches the collection on startupDynamic cache updates:
RefreshTubeArchivistCollectionId()public method to refresh the cachePluginConfiguration.CollectionTitlesetter to trigger refresh on changesEfficient validation:
IsItemInTubeArchivistCollection()helper methodPerformance Impact
Before:
After:
Testing
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.