From eb74dc4ae5f9123ebcac7fe89191c020a0284f0e Mon Sep 17 00:00:00 2001 From: scoobybejesus Date: Wed, 22 Jun 2022 21:16:14 -0400 Subject: [PATCH 1/2] Add SHOW_PREVIOUS_TRACKS env var, and use in base.html and index.html --- ircradio/templates/base.html | 2 +- ircradio/templates/index.html | 2 ++ settings.py_example | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ircradio/templates/base.html b/ircradio/templates/base.html index d774c3b..4b7ba98 100644 --- a/ircradio/templates/base.html +++ b/ircradio/templates/base.html @@ -31,7 +31,7 @@ - {% if ENABLE_SEARCH_ROUTE %} + {% if ENABLE_SEARCH_ROUTE or SHOW_PREVIOUS_TRACKS %} diff --git a/ircradio/templates/index.html b/ircradio/templates/index.html index e96a388..bee78c4 100644 --- a/ircradio/templates/index.html +++ b/ircradio/templates/index.html @@ -17,9 +17,11 @@

Now playing:

Nothing here yet
+ {% if SHOW_PREVIOUS_TRACKS %}
Previous:
Nothing here yet
+ {% endif %}

Command list:

diff --git a/settings.py_example b/settings.py_example index 6adff01..aeb10e4 100644 --- a/settings.py_example +++ b/settings.py_example @@ -17,6 +17,7 @@ timezone = "Europe/Amsterdam" dir_music = os.environ.get("DIR_MUSIC", os.path.join(cwd, "data", "music")) enable_search_route = bool_env(os.environ.get("ENABLE_SEARCH_ROUTE", False)) +show_previous_tracks = bool_env(os.environ.get("SHOW_PREVIOUS_TRACKS", False)) irc_admins_nicknames = ["dsc_"] irc_host = os.environ.get('IRC_HOST', 'localhost') From 9a66e1b853fdaad28156cd843c5089a9503f9c3a Mon Sep 17 00:00:00 2001 From: scoobybejesus Date: Wed, 22 Jun 2022 21:27:19 -0400 Subject: [PATCH 2/2] Subtle style change, plus launch new tabs on history/library. --- ircradio/templates/index.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ircradio/templates/index.html b/ircradio/templates/index.html index bee78c4..309d96d 100644 --- a/ircradio/templates/index.html +++ b/ircradio/templates/index.html @@ -4,7 +4,7 @@
-
+

IRC!Radio @@ -45,14 +45,14 @@
-

Library - (by user) +

View User Library +

-
+