From df777104afa90586be97c3274c080b1cbb18c2d0 Mon Sep 17 00:00:00 2001 From: simon Date: Thu, 24 Feb 2022 19:30:12 +0700 Subject: [PATCH] add video progress bar to channel_id and playlist_id views --- tubearchivist/home/templates/home/channel_id.html | 3 +++ tubearchivist/home/templates/home/playlist_id.html | 3 +++ tubearchivist/home/views.py | 2 ++ 3 files changed, 8 insertions(+) diff --git a/tubearchivist/home/templates/home/channel_id.html b/tubearchivist/home/templates/home/channel_id.html index 6a42c10..0402e09 100644 --- a/tubearchivist/home/templates/home/channel_id.html +++ b/tubearchivist/home/templates/home/channel_id.html @@ -110,6 +110,9 @@
video-thumb + {% if video.source.player.progress %} +
+ {% endif %}
play-icon diff --git a/tubearchivist/home/templates/home/playlist_id.html b/tubearchivist/home/templates/home/playlist_id.html index 41d8268..efac62b 100644 --- a/tubearchivist/home/templates/home/playlist_id.html +++ b/tubearchivist/home/templates/home/playlist_id.html @@ -91,6 +91,9 @@
video-thumb + {% if video.source.player.progress %} +
+ {% endif %}
play-icon diff --git a/tubearchivist/home/views.py b/tubearchivist/home/views.py index 131b78f..a196f6f 100644 --- a/tubearchivist/home/views.py +++ b/tubearchivist/home/views.py @@ -367,6 +367,7 @@ class ChannelIdView(ArchivistResultsView): self.initiate_vars(request) self._update_view_data(channel_id) self.find_results() + self.match_progress() if self.context["results"]: channel_info = self.context["results"][0]["source"]["channel"] @@ -468,6 +469,7 @@ class PlaylistIdView(ArchivistResultsView): playlist_name = playlist_info["playlist_name"] self._update_view_data(playlist_id, playlist_info) self.find_results() + self.match_progress() self.context.update( { "title": "Playlist: " + playlist_name,