From a53855ff2972d0643676bbe55bef46830e6c1f02 Mon Sep 17 00:00:00 2001 From: Ashley Date: Sun, 12 Nov 2023 17:26:24 +0000 Subject: [PATCH] add alot of stuff :3 --- src/libpoketube/init/pages-video.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libpoketube/init/pages-video.js b/src/libpoketube/init/pages-video.js index bfe53e2d..d873201f 100644 --- a/src/libpoketube/init/pages-video.js +++ b/src/libpoketube/init/pages-video.js @@ -227,7 +227,7 @@ module.exports = function (app, config, renderTemplate) { var vidurl = u.url - if(inv_vid.genre === "Music") { + if(inv_vid?.genre === "Music") { var vidurl = u.losslessurl } @@ -310,7 +310,7 @@ module.exports = function (app, config, renderTemplate) { } } catch (error) { console.error(error); - return res.redirect(`/watch?v=${req.query.v}&fx=1&err=${btoa(error)}`); + return res.redirect(`/watch?v=${req.query.v}&fx=1&err=${error}`); } }); }); @@ -333,7 +333,7 @@ module.exports = function (app, config, renderTemplate) { const data = await core.video(v); const color = data.color; const color2 = data.color2; - const desc = data.desc; + const desc = data?.desc; const isMobile = req.useragent.isMobile; const wiki = data.wiki; const { channel: tj } = data; @@ -529,4 +529,4 @@ module.exports = function (app, config, renderTemplate) { } } }); -}; +}; \ No newline at end of file