From 5b4c99c702757aa33393155af638b468983bbeb4 Mon Sep 17 00:00:00 2001 From: Umimaso Date: Sat, 19 Jun 2021 23:56:32 +0100 Subject: feat: add direct link MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jesús --- youtube/static/watch.css | 6 ++++++ youtube/templates/watch.html | 2 ++ youtube/watch.py | 1 + 3 files changed, 9 insertions(+) (limited to 'youtube') diff --git a/youtube/static/watch.css b/youtube/static/watch.css index 73eefdc..90c08d5 100644 --- a/youtube/static/watch.css +++ b/youtube/static/watch.css @@ -257,6 +257,7 @@ label[for=options-toggle-cbox] { "v-uploaded v-views" "v-published v-likes-dislikes" "external-player-controls v-checkbox" + "v-direct-link v-direct-link" "v-download v-download" "v-description v-description" "v-music-list v-music-list" @@ -287,6 +288,11 @@ label[for=options-toggle-cbox] { grid-area: v-checkbox; justify-self: end; } +.v-direct-link { + grid-area: v-direct-link; + padding-top: 0.5rem; + padding-bottom: 0.5rem; +} .v-download { grid-area: v-download; } .v-download > ul.download-dropdown-content { background: var(--secondary-background); diff --git a/youtube/templates/watch.html b/youtube/templates/watch.html index a8442ca..7068fb7 100644 --- a/youtube/templates/watch.html +++ b/youtube/templates/watch.html @@ -86,6 +86,8 @@ + Direct Link +
Download
    diff --git a/youtube/watch.py b/youtube/watch.py index 14d5fcd..6ff0735 100644 --- a/youtube/watch.py +++ b/youtube/watch.py @@ -546,6 +546,7 @@ def get_watch_page(video_id=None): invidious_used = info['invidious_used'], invidious_reload_button = info['invidious_reload_button'], video_url = util.URL_ORIGIN + '/watch?v=' + video_id, + video_id = video_id, time_start = time_start, js_data = { -- cgit v1.2.3