~cadence/tube-devel

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
3 2

[PATCH] Support /watch/, /shorts/, /v/, /w/ redirection

bopol
Details
Message ID
<20210216181120.7227-1-bopol@e.email>
DKIM signature
pass
Download raw message
Patch: +5 -0
---
 api/redirects.js | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/api/redirects.js b/api/redirects.js
index e940798..2b1880e 100644
--- a/api/redirects.js
+++ b/api/redirects.js
@@ -16,5 +16,10 @@ module.exports = [
			*/
			return redirect(`/watch?v=${fill[0]}${url.search.replace(/^\?/, "&")}`, 301)
		}
	},
	{
		route: `/(watch|w|v|shorts)/(${constants.regex.video_id})`, priority: -1, methods: ["GET"], code: async ({fill, url}) => {
			return redirect(`/watch?v=${fill[1]}${url.search.replace(/^\?/, "&")}`, 301)
		}
	}
]
-- 
2.29.2
Details
Message ID
<20210219013544.14809b6621c05ef239946dc2@disroot.org>
In-Reply-To
<20210216181120.7227-1-bopol@e.email> (view parent)
DKIM signature
pass
Download raw message
Thanks for teaching me that these redirects existed. Implemented using
my own code in commit f24da6c7b0a76615f8724689500916c0ae3f0f16.
bopol
Details
Message ID
<4aae905e5db39f292289c1818664898a@e.email>
In-Reply-To
<20210219013544.14809b6621c05ef239946dc2@disroot.org> (view parent)
DKIM signature
pass
Download raw message
I looked at youtube-dl's code and noticed I missed /e/

https://github.com/ytdl-org/youtube-dl/blob/master/youtube_dl/extractor/youtube.py#L382
Details
Message ID
<20210222233441.5f48af8dc4eecc84fcbf7713@disroot.org>
In-Reply-To
<4aae905e5db39f292289c1818664898a@e.email> (view parent)
DKIM signature
pass
Download raw message
/e/ redirects implemented.
Reply to thread Export thread (mbox)