Allow player config to better handle borked players.

This commit is contained in:
Matthew Stratford 2021-09-21 23:02:24 +01:00
parent 4e9a1c4b6e
commit 382de936a3

View file

@ -9,21 +9,25 @@
<h4 class="h5">Currently Selected</h4>
<p>
{% for channel in data.channels %}
<strong>Player {{channel.channel}}:</strong>
<strong>Player {{loop.index0}}:</strong>
{% if channel %}
{% if channel.output %}
{{channel.output}}
{% else %}
Default Audio Device
{% endif %}
{% if not channel.initialised %}
<code> - <strong>ERROR:</strong> Player did not start, potentially missing sound output?</code>
<code> - <strong>ERROR:</strong> Player did not start, potentially configured sound output is missing? Check <a href="/alerts">Alerts</a>.</code>
{% endif %}
{% else %}
<code> - <strong>ERROR:</strong> Player did not respond, likely it is dead :/ Check <a href="/alerts">Alerts</a>.</code>
{% endif %}
<br>
{% endfor %}
<br/>
<code>
Set for:
{% for channel in data.channels %}
{% for channel in data.channels if channel %}
<a href="/player/{{channel.channel}}/output/None">Player {{channel.channel}}</a> /
{% endfor %}
Default Audio Output
@ -37,7 +41,9 @@ Default Audio Output
{% if host_api.usable %}
Set for:
{% for channel in data.channels %}
{% if channel.output == output.name %}
{% if not channel %}
Player {{loop.index0}}
{% elif channel.output == output.name %}
<strong>Player {{channel.channel}}</strong>
{% else %}
<a href="/player/{{channel.channel}}/output/{{output.name}}">Player {{channel.channel}}</a>