fix(jellyfin): send explicit hide/show overlay instead of toggle

- Track overlay visibility in plugin state; y-t uses explicit hide/show commands when state is known
- Prevent paused Jellyfin playback from resuming on overlay hide
- Fix subtitle cache cleanup to only remove dirs after successful cleanup
This commit is contained in:
2026-05-22 22:07:35 -07:00
parent 9ba7f909b5
commit 27e3d956c9
6 changed files with 116 additions and 9 deletions
@@ -235,9 +235,11 @@ export function createPreloadJellyfinExternalSubtitlesHandler(deps: {
function cleanupActiveCache(): void {
const dirs = [...activeCacheDirs];
activeCacheDirs.clear();
if (dirs.length === 0) return;
deps.cleanupCachedSubtitles(dirs);
for (const dir of dirs) {
activeCacheDirs.delete(dir);
}
}
const runPreload = async (params: {