1
0
mirror of https://github.com/spl0k/supysonic.git synced 2024-11-10 04:02:17 +00:00
supysonic/templates/playlist.html

45 lines
1.5 KiB
HTML

{#-
This file is part of Supysonic.
Supysonic is a Python implementation of the Subsonic server API.
Copyright (C) 2013 Alban 'spl0k' Féron
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-#}
{% extends "layout.html" %}
{% block body %}
<h2>Playlist "{{ playlist.name }}"</h2>
{% if playlist.user_id|str == session.get('userid') %}
<h3>Edit</h3>
<form method="post">
<table>
<tr><th>Name</th><th>Public</th><th></th></tr>
<tr>
<td><input type="text" name="name" value="{{ playlist.name }}" /></td>
<td><input type="checkbox" name="public" {% if playlist.public %}checked="true"{% endif %} /></td>
<td><input type="submit" /></td>
</tr>
</table>
</form>
{% endif %}
<h3>Tracks</h3>
<table>
<tr><th>Artist</th><th>Title</th><th>Album</th><th>Length</th></tr>
{% for t in playlist.tracks %}
<tr><td>{{ t.album.artist.name }}</td><td>{{ t.title }}</td><td>{{ t.album.name }}</td><td>{{ t.duration_str() }}</td></tr>
{% endfor %}
</table>
{% endblock %}