From 7d8e318f64c6d4e55cd56add8feeae02c51b99ca Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Tue, 12 Nov 2024 17:33:00 +0100 Subject: [PATCH] Add MPV playlisting. --- templates/playlist.tmpl | 59 +++++++ templates/{index.tmpl => queries.tmpl} | 4 +- templates/results.tmpl | 2 +- templates/videos.tmpl | 2 +- ytplom.py | 213 +++++++++++++++++++++++-- 5 files changed, 261 insertions(+), 19 deletions(-) create mode 100644 templates/playlist.tmpl rename templates/{index.tmpl => queries.tmpl} (76%) diff --git a/templates/playlist.tmpl b/templates/playlist.tmpl new file mode 100644 index 0000000..b533d3c --- /dev/null +++ b/templates/playlist.tmpl @@ -0,0 +1,59 @@ + + + + + + + +

playlist · videos · queries

+ + +{% for prev_title, next_title in tuples %} + +{% endfor %} +
+{% if running %}{% if pause %}PAUSED{% else %}PLAYING{% endif %}{% else %}STOPPED{% endif %}:
+{{ current_title }}
+
+ + + + +
+
+{{ prev_title }} + +{{ next_title }} +
+ + + diff --git a/templates/index.tmpl b/templates/queries.tmpl similarity index 76% rename from templates/index.tmpl rename to templates/queries.tmpl index b34319d..0d888b0 100644 --- a/templates/index.tmpl +++ b/templates/queries.tmpl @@ -1,9 +1,9 @@ -

queries · videos

+

playlist · videos · queries

quota: {{quota_count}}/100000

-
+
diff --git a/templates/results.tmpl b/templates/results.tmpl index 6b7ac2b..8b88362 100644 --- a/templates/results.tmpl +++ b/templates/results.tmpl @@ -1,7 +1,7 @@ -

queries · videos

+

playlist · videos · queries

query: {{query_text}}

{% for video in videos %} diff --git a/templates/videos.tmpl b/templates/videos.tmpl index 757e566..daba8ed 100644 --- a/templates/videos.tmpl +++ b/templates/videos.tmpl @@ -1,7 +1,7 @@ -

queries · videos

+

playlist · videos · queries

downloaded videos: