From 6f8cb76719a21b8027fa53bc413a6ab28c591536 Mon Sep 17 00:00:00 2001 From: girst Date: Tue, 4 Aug 2020 12:45:46 +0200 Subject: [PATCH] use all muxed formats for reliability sometimes, a muxed stream is broken (yet still returns 200OK, so can't easily detect server side). when the browser tries to load the broken stream and can't play it, it moves on to the next available one. was able to reproduce with ytid Xs9rnAH3VAQ --- app/youtube/__init__.py | 2 +- app/youtube/templates/watch.html.j2 | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/youtube/__init__.py b/app/youtube/__init__.py index 1291c5c..6eac9de 100644 --- a/app/youtube/__init__.py +++ b/app/youtube/__init__.py @@ -136,7 +136,7 @@ def watch(): ))""", (meta['channel_id'], token, video_id, token)) (is_subscribed, is_pinned) = c.fetchone() return render_template('watch.html.j2', - video_id=video_id, video_url=video_url, + video_id=video_id, video_url=video_url, stream_map=stream_map, video_error=error, errdetails=errdetails, invidious_url=invidious_url, is_pinned=is_pinned, is_subscribed=is_subscribed, **meta) diff --git a/app/youtube/templates/watch.html.j2 b/app/youtube/templates/watch.html.j2 index 72fb6df..ab80604 100644 --- a/app/youtube/templates/watch.html.j2 +++ b/app/youtube/templates/watch.html.j2 @@ -7,7 +7,9 @@ {% if video_url %}