watch.py: Support /shorts urls

Signed-off-by: Jesús <heckyel@hyperbola.info>
This commit is contained in:
James Taylor 2021-09-06 15:26:23 -07:00 committed by Jesús
parent 9c7e93ecf8
commit 3066f9a37e
No known key found for this signature in database
GPG Key ID: F6EE7BC59A315766

View File

@ -512,6 +512,8 @@ time_table = {'h': 3600, 'm': 60, 's': 1}
@yt_app.route('/watch') @yt_app.route('/watch')
@yt_app.route('/embed') @yt_app.route('/embed')
@yt_app.route('/embed/<video_id>') @yt_app.route('/embed/<video_id>')
@yt_app.route('/shorts')
@yt_app.route('/shorts/<video_id>')
def get_watch_page(video_id=None): def get_watch_page(video_id=None):
video_id = request.args.get('v') or video_id video_id = request.args.get('v') or video_id
if not video_id: if not video_id: