1
0
mirror of https://github.com/spl0k/supysonic.git synced 2024-09-20 03:11:04 +00:00
supysonic/templates/profile.html

49 lines
1.9 KiB
HTML
Executable File

{% extends "layout.html" %}
{% block body %}
<h2>{{ user.name }}</h2>
<ul>
{% if user.admin %}<li>You're an admin!</li>{% endif %}
<li><strong>Email</strong>: {{ user.mail }} - <a href="{{ url_for('change_mail') }}">Change</a></li>
<li>
<strong>LastFM status</strong>:
{% if api_key %}
{% if user.lastfm_session %}
{% if user.lastfm_status %}Linked{% else %}Invalid session{% endif %} - <a href="{{ url_for('lastfm_unreg') }}">Unlink</a>
{% else %}
Unlinked - <a href="http://www.last.fm/api/auth/?api_key={{ api_key }}&cb={{ request.url_root[:-(request.script_root|length+1)] + url_for('lastfm_reg') }}">Link</a>
{% endif %}
{% else %}
Unavailable
{% endif %}
</li>
<li><a href="{{ url_for('change_password') }}">Change password</a></li>
</ul>
{% if clients %}
<h2>Known streaming clients</h2>
<form method="post">
<table>
<tr><th>Client</th><th>Format</th><th>Max bitrate</th><th>Forget</th></tr>
{% for client in clients %}
<tr>
<td>{{ client.client_name }}</td>
<td><input type="text" name="{{ client.client_name }}_format" value="{{ client.format if client.format else '' }}" /></td>
<td><select name="{{ client.client_name }}_bitrate">
<option />
<option {{ 'selected="selected"' if client.bitrate == 64 else '' }}>64</option>
<option {{ 'selected="selected"' if client.bitrate == 96 else '' }}>96</option>
<option {{ 'selected="selected"' if client.bitrate == 128 else '' }}>128</option>
<option {{ 'selected="selected"' if client.bitrate == 192 else '' }}>192</option>
<option {{ 'selected="selected"' if client.bitrate == 256 else '' }}>256</option>
<option {{ 'selected="selected"' if client.bitrate == 320 else '' }}>320</option>
</select></td>
<td><input type="checkbox" name="{{ client.client_name }}_delete" /></td>
</tr>
{% endfor %}
</table>
<input type="submit" value="Save" />
</form>
{% endif %}
{% endblock %}