Allow https host

This commit is contained in:
the1812 2019-07-22 21:05:47 +08:00
parent 8948982199
commit d889bffbc5
7 changed files with 11 additions and 11 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -10,7 +10,7 @@ class Batch {
const json = JSON.parse(await this.collectData(quality))
if (rpc) {
const option = settings.aria2RpcOption
const host = option.host.startsWith('http://') ? option.host : 'http://' + option.host
const host = option.host.match(/^http[s]?:\/\//) ? option.host : 'http://' + option.host
const methodName = 'aria2.addUri'
for (const item of json) {
const params = item.fragments.map((fragment, index) => {

View File

@ -255,7 +255,7 @@ class VideoDownloader {
VideoDownloader.downloadBlob(new Blob([danmaku]), `${getFriendlyTitle()}.${this.danmakuOption === 'ASS' ? 'ass' : 'xml'}`);
}
const option = settings.aria2RpcOption;
const host = option.host.startsWith('http://') ? option.host : 'http://' + option.host;
const host = option.host.match(/^http[s]?:\/\//) ? option.host : 'http://' + option.host;
const methodName = 'aria2.addUri';
const params = this.fragments.map((fragment, index) => {
let indexNumber = '';

View File

@ -279,7 +279,7 @@ class VideoDownloader {
VideoDownloader.downloadBlob(new Blob([danmaku]), `${getFriendlyTitle()}.${this.danmakuOption === 'ASS' ? 'ass' : 'xml'}`)
}
const option = settings.aria2RpcOption
const host = option.host.startsWith('http://') ? option.host : 'http://' + option.host
const host = option.host.match(/^http[s]?:\/\//) ? option.host : 'http://' + option.host
const methodName = 'aria2.addUri'
const params = this.fragments.map((fragment, index) => {
let indexNumber = ''