fix(subsync): decode file:// tracks mpv reports for dropped subtitles

- Sync a subtitle dropped onto mpv without hitting "Protocol file: not supported"; decode file:// external-filename/path back to a real path for target, reference, and video
- Stream strip proxy: destroy the connection instead of retrying/502 once a response is handed off, and cap buffered playlist bodies
- Bridge installer: cap downloaded bundle size to guard against a lying/missing content-length
- Anime browser playback: bump generation on dispose so a stale in-flight playEpisode cleans up its own subtitle cache
- Fix a flaky sidecar-process test by binding to an OS-assigned port instead of pre-allocating one
This commit is contained in:
2026-08-06 22:41:16 -07:00
parent 8c22567da9
commit 51fc9034f7
10 changed files with 200 additions and 8 deletions
+5 -2
View File
@@ -5,6 +5,7 @@ import {
codecToExtension,
fileExists,
MpvTrack,
resolveLocalMediaPath,
runCommand,
summarizeCommandFailure,
} from '../../subsync/utils';
@@ -148,10 +149,12 @@ export async function extractSubtitleTrackToFile(
input: SubtitleExtractionInput,
): Promise<FileExtractionResult> {
if (input.track.external) {
const externalPath = input.track['external-filename'];
if (typeof externalPath !== 'string' || externalPath.length === 0) {
const externalFilename = input.track['external-filename'];
if (typeof externalFilename !== 'string' || externalFilename.length === 0) {
throw new Error('External subtitle track has no file path');
}
// A dropped subtitle arrives as a `file://` URL, which is local, not remote.
const externalPath = resolveLocalMediaPath(externalFilename);
if (isRemoteMediaPath(externalPath)) {
return downloadRemoteSubtitleTrack(externalPath, input.httpHeaders);
}