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> <h4 class="h5">Currently Selected</h4>
<p> <p>
{% for channel in data.channels %} {% for channel in data.channels %}
<strong>Player {{channel.channel}}:</strong> <strong>Player {{loop.index0}}:</strong>
{% if channel %}
{% if channel.output %} {% if channel.output %}
{{channel.output}} {{channel.output}}
{% else %} {% else %}
Default Audio Device Default Audio Device
{% endif %} {% endif %}
{% if not channel.initialised %} {% 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 %} {% endif %}
<br> <br>
{% endfor %} {% endfor %}
<br/> <br/>
<code> <code>
Set for: 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> / <a href="/player/{{channel.channel}}/output/None">Player {{channel.channel}}</a> /
{% endfor %} {% endfor %}
Default Audio Output Default Audio Output
@ -37,7 +41,9 @@ Default Audio Output
{% if host_api.usable %} {% if host_api.usable %}
Set for: Set for:
{% for channel in data.channels %} {% 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> <strong>Player {{channel.channel}}</strong>
{% else %} {% else %}
<a href="/player/{{channel.channel}}/output/{{output.name}}">Player {{channel.channel}}</a> <a href="/player/{{channel.channel}}/output/{{output.name}}">Player {{channel.channel}}</a>