mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-28 16:49:04 +01:00
check if formats exist
This commit is contained in:
parent
3210066cb1
commit
7ac4105844
1 changed files with 25 additions and 24 deletions
|
@ -112,7 +112,7 @@ module.exports = function (app, config, renderTemplate) {
|
|||
const h = await video.text();
|
||||
const k = JSON.parse(modules.toJson(h));
|
||||
if (!v) res.redirect("/");
|
||||
|
||||
if ("Formats" in fetching.video.Player) {
|
||||
//video
|
||||
const j = fetching.video.Player.Formats.Format,
|
||||
j_ = Array.isArray(j) ? j[j.length - 1] : j;
|
||||
|
@ -141,6 +141,7 @@ module.exports = function (app, config, renderTemplate) {
|
|||
res.json(re);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
app.get("/watch", async function (req, res) {
|
||||
|
|
Loading…
Reference in a new issue