reddit is back!
- fixed reddit support (i had no idea older posts had a different naming pattern for media files) - improved russian localisation - now frontend handles more unexpected api errors in case something goes absolutely wrong
This commit is contained in:
@@ -25,7 +25,7 @@ export default async function (host, patternMatch, url, ip, lang, format, qualit
|
||||
videoId: patternMatch["videoId"],
|
||||
lang: lang, quality: quality
|
||||
});
|
||||
return (!r.error) ? apiJSON(2, { type: "bridge", urls: r.url, filename: r.filename, service: host, ip: ip, salt: process.env.streamSalt }) : apiJSON(0, { t: r.error });
|
||||
return (!r.error) ? apiJSON(2, { type: "bridge", u: r.url, filename: r.filename, service: host, ip: ip, salt: process.env.streamSalt }) : apiJSON(0, { t: r.error });
|
||||
} else throw Error()
|
||||
case "bilibili":
|
||||
if (patternMatch["id"] && patternMatch["id"].length >= 12) {
|
||||
@@ -34,7 +34,7 @@ export default async function (host, patternMatch, url, ip, lang, format, qualit
|
||||
lang: lang
|
||||
});
|
||||
return (!r.error) ? apiJSON(2, {
|
||||
type: "render", urls: r.urls, lang: lang,
|
||||
type: "render", u: r.urls, lang: lang,
|
||||
service: host, ip: ip,
|
||||
filename: r.filename,
|
||||
salt: process.env.streamSalt, time: r.time
|
||||
@@ -62,7 +62,7 @@ export default async function (host, patternMatch, url, ip, lang, format, qualit
|
||||
}
|
||||
let r = await youtube(fetchInfo);
|
||||
return (!r.error) ? apiJSON(2, {
|
||||
type: r.type, urls: r.urls, service: host, ip: ip,
|
||||
type: r.type, u: r.urls, service: host, ip: ip,
|
||||
filename: r.filename, salt: process.env.streamSalt,
|
||||
isAudioOnly: fetchInfo["isAudioOnly"] ? fetchInfo["isAudioOnly"] : false,
|
||||
time: r.time,
|
||||
@@ -75,8 +75,8 @@ export default async function (host, patternMatch, url, ip, lang, format, qualit
|
||||
id: patternMatch["id"],
|
||||
title: patternMatch["title"], lang: lang,
|
||||
});
|
||||
return (!r.error) ? apiJSON(2, {
|
||||
type: "render", urls: r.urls,
|
||||
return (!r.error) ? apiJSON(r.typeId, {
|
||||
type: r.type, u: r.urls,
|
||||
service: host, ip: ip,
|
||||
filename: r.filename, salt: process.env.streamSalt
|
||||
}) : apiJSON(0, { t: r.error });
|
||||
|
||||
Reference in New Issue
Block a user