mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-11-22 04:46:07 -08:00
feat(youtube): add YouTube browser window and Whisper subtitle source (#273)
This commit is contained in:
1 parent
c68b73c8c1
commit
07b32626a6
101 files changed
+2269
-726
No files matched your search
@@ -9,6 +9,8 @@ export function runSubtitleGenerationProcess(input: {
|
||||
args: string[];
|
||||
signal?: AbortSignal;
|
||||
onLine?: (line: string) => void;
|
||||
/** Shown when the executable is missing; defaults to pointing at subtitleGeneration settings. */
|
||||
missingMessage?: string;
|
||||
}): Promise<string> {
|
||||
input.signal?.throwIfAborted();
|
||||
return new Promise((resolve, reject) => {
|
||||
@@ -51,7 +53,8 @@ export function runSubtitleGenerationProcess(input: {
|
||||
reject(
|
||||
new Error(
|
||||
'code' in error && error.code === 'ENOENT'
|
||||
? `${input.command} was not found. Install it or set its path under subtitleGeneration in Settings.`
|
||||
? (input.missingMessage ??
|
||||
`${input.command} was not found. Install it or set its path under subtitleGeneration in Settings.`)
|
||||
: `Could not run ${input.command}: ${error.message}`,
|
||||
),
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user