Add SHOW_PREVIOUS_TRACKS env var, and use in base.html and index.html

This commit is contained in:
scoobybejesus 2022-06-22 21:16:14 -04:00
parent 25b46feac7
commit eb74dc4ae5
3 changed files with 4 additions and 1 deletions

View File

@ -31,7 +31,7 @@
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
{% if ENABLE_SEARCH_ROUTE %}
{% if ENABLE_SEARCH_ROUTE or SHOW_PREVIOUS_TRACKS %}
<link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"></link>
<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>

View File

@ -17,9 +17,11 @@
<h3>Now playing: </h3>
<div id="now_playing" style="padding-top:6px; margin-bottom:1.75rem;">Nothing here yet</div>
{% if SHOW_PREVIOUS_TRACKS %}
<h5>Previous: </h5>
<div id="prev_one" style="font-size:12px;">Nothing here yet</div>
<div id="prev_two" style="font-size:12px;"></div>
{% endif %}
<hr>
<h4>Command list:</h4>

View File

@ -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')