mirror of
https://github.com/jely2002/youtube-dl-gui.git
synced 2021-11-01 22:46:21 +03:00
fix: Signature decrpytion failure caused by mobile user agents #55
This commit is contained in:
@@ -139,10 +139,12 @@ class ErrorHandler {
|
||||
}
|
||||
if(!foundError) {
|
||||
if(stderr.includes("ERROR")) {
|
||||
foundError = true;
|
||||
console.error(stderr)
|
||||
this.raiseUnhandledError(stderr, identifier);
|
||||
}
|
||||
}
|
||||
return foundError;
|
||||
}
|
||||
|
||||
raiseUnhandledError(error, identifier) {
|
||||
|
||||
@@ -17,7 +17,7 @@ class Query {
|
||||
|
||||
if(this.environment.settings.spoofUserAgent) {
|
||||
args.push("--user-agent"); //Add random user agent to slow down user agent profiling
|
||||
args.push(new UserAgent().toString());
|
||||
args.push(new UserAgent({ deviceCategory: 'desktop' }).toString());
|
||||
}
|
||||
|
||||
if(!this.environment.settings.validateCertificate) {
|
||||
@@ -42,8 +42,9 @@ class Query {
|
||||
const {stdout} = await execa(command, args);
|
||||
return stdout
|
||||
} catch(e) {
|
||||
console.error(e.stderr);
|
||||
this.environment.errorHandler.raiseUnhandledError("Please report this error.\n" + e.stderr, this.identifier);
|
||||
if(!this.environment.errorHandler.checkError(e.stderr, this.identifier)) {
|
||||
this.environment.errorHandler.raiseUnhandledError("Please report this error.\n" + e.stderr, this.identifier);
|
||||
}
|
||||
return "{}";
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user