change error codee

This commit is contained in:
Ashley 2023-03-03 18:49:40 +00:00
parent 424a6fb789
commit 252dafaca3

View file

@ -211,6 +211,7 @@ module.exports = function (app, config, renderTemplate) {
core.video(v).then((data) => { core.video(v).then((data) => {
try { try {
const k = data.video; const k = data.video;
const json = data.json; const json = data.json;
const engagement = data.engagement; const engagement = data.engagement;
const inv_comments = data.comments || "Disabled"; const inv_comments = data.comments || "Disabled";
@ -239,6 +240,12 @@ module.exports = function (app, config, renderTemplate) {
if(inv_vid?.error === "The uploader has not made this video available in your country"){ if(inv_vid?.error === "The uploader has not made this video available in your country"){
res.send("error : " + inv_vid.error + " please refresh the page please qt ") res.send("error : " + inv_vid.error + " please refresh the page please qt ")
} }
if(inv_vid?.error === "This video is not available"){
res.send("error : " + inv_vid.error + " please refresh the page please qt ")
}
renderTemplate(res, req, "poketube.ejs", { renderTemplate(res, req, "poketube.ejs", {
color: data.color, color: data.color,
@ -276,7 +283,7 @@ module.exports = function (app, config, renderTemplate) {
lyrics: "", lyrics: "",
}); });
} catch { } catch {
return res.redirect("/?fromerror=43"); return res.redirect("/?fromerror=41");
} }
}); });
}); });