fix(tools): never block downloads while a runnable tool exists

ensureStreamlinkInstalled and ensureFfmpegInstalled forced a managed
reinstall whenever a bundled tool directory existed without passing
manifest verification. When that reinstall failed (offline, blocked
download, locked executable), both functions returned false without ever
probing the tool that was already present and runnable, so every
download path aborted with an auto-install error while the System Check
kept reporting the same tool as available. Both functions now fall back
to the same executability probe the System Check uses after a failed
managed repair, cache the verified command on success, and only report
failure when nothing runnable remains. The repair attempt itself is
preserved and retried on the next call.

The tool archive download also registered no error handler on the HTTP
response stream. A stream that failed mid-transfer settled neither the
writer finish nor the writer error path, leaving the install promise
pending forever and the download start hanging indefinitely. The
response stream now rejects the download on error and destroys the
writer.

Merge group downloads reported the bare "Streamlink is missing." text
while the VOD and live paths already explained the failed auto-install.
All three gates now share streamlinkAutoInstallFailed, ffmpeg gained the
matching ffmpegAutoInstallFailed message, and the now unused
streamlinkMissing and ffmpegMissing keys were removed.

The Managed tools panel showed "Missing / Unverified" with no hint that
downloads still work through a system-provided installation, which reads
like a hard failure on machines that never installed the managed copies.
getManagedToolStatuses now reports per tool whether a runnable
installation answers the version probe, and the panel appends a
localized "Downloads still available" note whenever an unverified state
is covered by a working tool.
This commit is contained in:
Sucukdeluxe
2026-08-14 12:46:02 +02:00
parent 9e8a3a0f4d
commit 477dfd5750
10 changed files with 281 additions and 19 deletions
+2 -2
View File
@@ -6471,12 +6471,12 @@ async function processDownloadMergeGroup(
if (mg.mergePhase === 'downloading') {
const streamlinkReady = await ensureStreamlinkInstalled();
if (!streamlinkReady) {
return { success: false, error: tBackend('streamlinkMissing') };
return { success: false, error: tBackend('streamlinkAutoInstallFailed') };
}
const ffmpegReady = await ensureFfmpegInstalled();
if (!ffmpegReady) {
return { success: false, error: tBackend('ffmpegMissing') };
return { success: false, error: tBackend('ffmpegAutoInstallFailed') };
}
const streamer = mg.items[0].streamer.replace(/[^a-zA-Z0-9_-]/g, '');