1
0
Fork 0
mirror of https://codeberg.org/ashley/poke.git synced 2024-11-17 10:14:39 -05:00

check if formats exist

This commit is contained in:
Ashley 2022-12-24 19:27:24 +00:00
parent 17c90e8c42
commit 8c644bd27e

View file

@ -112,7 +112,7 @@ module.exports = function (app, config, renderTemplate) {
const h = await video.text(); const h = await video.text();
const k = JSON.parse(modules.toJson(h)); const k = JSON.parse(modules.toJson(h));
if (!v) res.redirect("/"); if (!v) res.redirect("/");
if ("Formats" in fetching.video.Player) {
//video //video
const j = fetching.video.Player.Formats.Format, const j = fetching.video.Player.Formats.Format,
j_ = Array.isArray(j) ? j[j.length - 1] : j; j_ = Array.isArray(j) ? j[j.length - 1] : j;
@ -141,6 +141,7 @@ module.exports = function (app, config, renderTemplate) {
res.json(re); res.json(re);
} }
} }
}
}); });
app.get("/watch", async function (req, res) { app.get("/watch", async function (req, res) {