api/match-action: rename isM3U8 to isHLS and u to url
This commit is contained in:
@@ -9,7 +9,7 @@ export default function({ r, host, audioFormat, isAudioOnly, isAudioMuted, disab
|
||||
let action,
|
||||
responseType = "tunnel",
|
||||
defaultParams = {
|
||||
u: r.urls,
|
||||
url: r.urls,
|
||||
headers: r.headers,
|
||||
service: host,
|
||||
filename: r.filenameAttributes ?
|
||||
@@ -24,7 +24,7 @@ export default function({ r, host, audioFormat, isAudioOnly, isAudioMuted, disab
|
||||
else if (r.isGif && twitterGif) action = "gif";
|
||||
else if (isAudioOnly) action = "audio";
|
||||
else if (isAudioMuted) action = "muteVideo";
|
||||
else if (r.isM3U8) action = "m3u8";
|
||||
else if (r.isHLS) action = "hls";
|
||||
else action = "video";
|
||||
|
||||
if (action === "picker" || action === "audio") {
|
||||
@@ -54,7 +54,7 @@ export default function({ r, host, audioFormat, isAudioOnly, isAudioMuted, disab
|
||||
params = { type: "gif" };
|
||||
break;
|
||||
|
||||
case "m3u8":
|
||||
case "hls":
|
||||
params = {
|
||||
type: Array.isArray(r.urls) ? "merge" : "remux"
|
||||
}
|
||||
@@ -62,12 +62,12 @@ export default function({ r, host, audioFormat, isAudioOnly, isAudioMuted, disab
|
||||
|
||||
case "muteVideo":
|
||||
let muteType = "mute";
|
||||
if (Array.isArray(r.urls) && !r.isM3U8) {
|
||||
if (Array.isArray(r.urls) && !r.isHLS) {
|
||||
muteType = "proxy";
|
||||
}
|
||||
params = {
|
||||
type: muteType,
|
||||
u: Array.isArray(r.urls) ? r.urls[0] : r.urls
|
||||
url: Array.isArray(r.urls) ? r.urls[0] : r.urls
|
||||
}
|
||||
if (host === "reddit" && r.typeId === "redirect") {
|
||||
responseType = "redirect";
|
||||
@@ -92,10 +92,10 @@ export default function({ r, host, audioFormat, isAudioOnly, isAudioMuted, disab
|
||||
}
|
||||
params = {
|
||||
picker: r.picker,
|
||||
u: createStream({
|
||||
url: createStream({
|
||||
service: "tiktok",
|
||||
type: audioStreamType,
|
||||
u: r.urls,
|
||||
url: r.urls,
|
||||
headers: r.headers,
|
||||
filename: r.audioFilename,
|
||||
isAudioOnly: true,
|
||||
@@ -184,14 +184,14 @@ export default function({ r, host, audioFormat, isAudioOnly, isAudioMuted, disab
|
||||
}
|
||||
}
|
||||
|
||||
if (r.isM3U8 || host === "vimeo") {
|
||||
if (r.isHLS || host === "vimeo") {
|
||||
copy = false;
|
||||
processType = "audio";
|
||||
}
|
||||
|
||||
params = {
|
||||
type: processType,
|
||||
u: Array.isArray(r.urls) ? r.urls[1] : r.urls,
|
||||
url: Array.isArray(r.urls) ? r.urls[1] : r.urls,
|
||||
|
||||
audioBitrate,
|
||||
audioCopy: copy,
|
||||
|
||||
Reference in New Issue
Block a user