fix(jellyfin): show overlay, inject plugin, and fix stats title on playb

- Show visible overlay automatically during Jellyfin playback so subtitleStyle applies
- Inject bundled mpv plugin on auto-launch so keybindings work without overlay focus
- Group Jellyfin playback stats under item metadata (jellyfin://host/item/id) instead of stream URLs so episodes merge with matching local titles
- Mark ffsubsync unavailable in subsync modal for remote media paths
- Drain queued second-instance commands even when onReady throws
This commit is contained in:
2026-05-21 22:26:59 -07:00
parent c6328eef09
commit 3a2d7a282d
49 changed files with 976 additions and 106 deletions
+6 -7
View File
@@ -212,12 +212,11 @@ export function createManagedLocalSubtitleSelectionRuntime(deps: {
pendingTimer = null;
};
const hasAppliedSelectionForCurrentMediaPath = (): boolean =>
appliedPrimaryMediaPath === currentMediaPath && appliedSecondaryMediaPath === currentMediaPath;
const maybeApplySelection = (trackList: unknown[] | null): void => {
if (
!currentMediaPath ||
(appliedPrimaryMediaPath === currentMediaPath &&
appliedSecondaryMediaPath === currentMediaPath)
) {
if (!currentMediaPath || hasAppliedSelectionForCurrentMediaPath()) {
return;
}
const selection = resolveManagedLocalSubtitleSelection({
@@ -236,7 +235,7 @@ export function createManagedLocalSubtitleSelectionRuntime(deps: {
deps.sendMpvCommand(['set_property', 'secondary-sid', selection.secondaryTrackId]);
appliedSecondaryMediaPath = currentMediaPath;
}
if (appliedPrimaryMediaPath === currentMediaPath) {
if (hasAppliedSelectionForCurrentMediaPath()) {
clearPendingTimer();
}
};
@@ -260,7 +259,7 @@ export function createManagedLocalSubtitleSelectionRuntime(deps: {
const scheduleRefresh = (): void => {
clearPendingTimer();
if (!currentMediaPath || appliedPrimaryMediaPath === currentMediaPath) {
if (!currentMediaPath || hasAppliedSelectionForCurrentMediaPath()) {
return;
}
pendingTimer = deps.schedule(() => {