From 3f7bd826f5d19623e1266b6f77bd30ae0279e5eb Mon Sep 17 00:00:00 2001 From: Ashley Date: Sat, 24 Dec 2022 12:30:31 +0000 Subject: [PATCH] add more redirects --- src/libpoketube/init/pages-redir.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/libpoketube/init/pages-redir.js b/src/libpoketube/init/pages-redir.js index 12760ba6..bd447aec 100644 --- a/src/libpoketube/init/pages-redir.js +++ b/src/libpoketube/init/pages-redir.js @@ -37,6 +37,22 @@ module.exports = function (app, config, renderTemplate) { return res.redirect(`/watch?v=${req.params.id}&from=short`); }); + app.get("/v/:id", (req, res) => { + if (!req.params.id) { + return res.redirect("/"); + } + + return res.redirect(`/watch?v=${req.params.id}&from=v_url`); + }); + + app.get("/c/:id", (req, res) => { + if (!req.params.id) { + return res.redirect("/"); + } + + return res.redirect(`/channel?id=${req.params.id}&from=c_channel_url`); + }); + app.get("/video/upload", (req, res) => { res.redirect("https://youtube.com/upload"); });