From d2dc41a620d582c496eafc4b3293d8b90890a67e Mon Sep 17 00:00:00 2001 From: girst Date: Tue, 29 Sep 2020 00:13:32 +0200 Subject: [PATCH] add &t= to redirect-to-watch --- app/youtube/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/youtube/__init__.py b/app/youtube/__init__.py index 1229206..4421cff 100644 --- a/app/youtube/__init__.py +++ b/app/youtube/__init__.py @@ -147,7 +147,7 @@ def watch(): @frontend.route('/embed/') def embed(video_id): - return redirect(url_for('youtube.watch', v=video_id)) + return redirect(url_for('.watch', v=video_id, t=request.args.get('start'))) @frontend.route('/') @frontend.route('//') @@ -156,7 +156,7 @@ def plain_user_or_video(something): # short-urls. a "just-a-variable-endpoint" has lowest priority, so this # shouldn't interfere with anything. if re.match(r"^[-_0-9A-Za-z]{11}$", something): # looks like a video id - return redirect(url_for('.watch', v=something)) + return redirect(url_for('.watch', v=something, t=request.args.get('t'))) else: # maybe a channel/user name? return redirect(url_for('.channel', channel_id=something)) -- 2.39.3