feat(queue): announce tool preparation before every download starts
Windows CI / verify (push) Failing after 3m56s
Windows CI / verify (push) Failing after 3m56s
On a fresh installation the first download repairs the managed Streamlink and FFmpeg copies, which downloads and extracts roughly two hundred megabytes before the actual VOD transfer begins. The queue item previously sat on a generic starting status for that entire window - the old preparing hint only appeared when the streamlink command had not been verified yet, and a prior System Check verifies the command without making the managed repair any cheaper, so users saw no explanation for delays of a minute or more. All three download paths - VOD, live recording and merge groups - now report a dedicated localized "Preparing download tools" status before the tool gates run, and the misleading conditional hint was removed.
This commit is contained in:
+30
-16
@@ -129,7 +129,7 @@ import {
|
||||
refreshBundledToolPaths, ensureStreamlinkInstalled, ensureFfmpegInstalled,
|
||||
getManagedToolStatuses, repairManagedTools, resetManagedTools,
|
||||
canExecute, canExecuteCommand,
|
||||
cacheVerifiedStreamlinkCommand, isVerifiedStreamlinkCommand,
|
||||
cacheVerifiedStreamlinkCommand,
|
||||
cacheVerifiedFfmpegCommands, isVerifiedFfmpegCommands,
|
||||
invalidateVerifiedToolCaches, setManagedToolExecutionObserver
|
||||
} from './tools';
|
||||
@@ -5885,6 +5885,16 @@ async function downloadLiveStream(
|
||||
item: QueueItem,
|
||||
onProgress: (progress: DownloadProgress) => void
|
||||
): Promise<DownloadResult> {
|
||||
onProgress({
|
||||
id: item.id,
|
||||
progress: -1,
|
||||
speed: '',
|
||||
eta: '',
|
||||
status: tBackend('statusPreparingTools'),
|
||||
currentPart: 0,
|
||||
totalParts: 0
|
||||
});
|
||||
|
||||
const streamlinkReady = await ensureStreamlinkInstalled();
|
||||
if (!streamlinkReady) {
|
||||
return { success: false, error: tBackend('streamlinkAutoInstallFailed') };
|
||||
@@ -6203,21 +6213,15 @@ async function downloadVOD(
|
||||
};
|
||||
}
|
||||
|
||||
const streamlinkCmd = getStreamlinkCommand();
|
||||
const streamlinkVersionArgs = [...streamlinkCmd.prefixArgs, '--version'];
|
||||
const streamlinkAlreadyVerified = isVerifiedStreamlinkCommand(streamlinkCmd.command, streamlinkVersionArgs);
|
||||
|
||||
if (!streamlinkAlreadyVerified) {
|
||||
onProgress({
|
||||
id: item.id,
|
||||
progress: -1,
|
||||
speed: '',
|
||||
eta: '',
|
||||
status: tBackend('statusCheckingTools'),
|
||||
currentPart: 0,
|
||||
totalParts: 0
|
||||
});
|
||||
}
|
||||
onProgress({
|
||||
id: item.id,
|
||||
progress: -1,
|
||||
speed: '',
|
||||
eta: '',
|
||||
status: tBackend('statusPreparingTools'),
|
||||
currentPart: 0,
|
||||
totalParts: 0
|
||||
});
|
||||
|
||||
const streamlinkReady = await ensureStreamlinkInstalled();
|
||||
if (!streamlinkReady) {
|
||||
@@ -6469,6 +6473,16 @@ async function processDownloadMergeGroup(
|
||||
|
||||
// ---- PHASE 1: DOWNLOADING ----
|
||||
if (mg.mergePhase === 'downloading') {
|
||||
onProgress({
|
||||
id: item.id,
|
||||
progress: -1,
|
||||
speed: '',
|
||||
eta: '',
|
||||
status: tBackend('statusPreparingTools'),
|
||||
currentPart: 0,
|
||||
totalParts: 0
|
||||
});
|
||||
|
||||
const streamlinkReady = await ensureStreamlinkInstalled();
|
||||
if (!streamlinkReady) {
|
||||
return { success: false, error: tBackend('streamlinkAutoInstallFailed') };
|
||||
|
||||
Reference in New Issue
Block a user