1
0
mirror of https://github.com/spl0k/supysonic.git synced 2024-12-23 01:16:18 +00:00

Deleted tracklist on main page (was mostly used for debug)

This commit is contained in:
Alban 2012-10-21 16:25:16 +02:00
parent ec01271dc0
commit 4d4706a43a
2 changed files with 1 additions and 11 deletions

View File

@ -37,13 +37,4 @@
{% endfor %} {% endfor %}
</table> </table>
<h2>Tracks</h2>
<table>
<tr><th>Artist</th><th>Album</th><th>Disc</th><th>#</th><th>Title</th><th>Len</th><th>Path</th></tr>
{% for track in tracks %}
<tr><td>{{ track.album.artist.name }}</td><td>{{ track.album.name }}</td><td>{{ track.disc }}</td><td>{{ track.number }}</td><td>{{ track.title }}</td><td>{{ track.duration_str() }}</td><td>{{ track.path }}</td></tr>
{% endfor %}
</table>
<p>{{ tracks|length }} tracks</p>
{% endblock %} {% endblock %}

3
web.py
View File

@ -25,8 +25,7 @@ def index():
""" """
return render_template('home.html', users = db.User.query.all(), folders = db.MusicFolder.query.all(), return render_template('home.html', users = db.User.query.all(), folders = db.MusicFolder.query.all(),
artists = db.Artist.query.order_by(db.Artist.name).all(), artists = db.Artist.query.order_by(db.Artist.name).all(),
albums = db.Album.query.join(db.Album.artist).order_by(db.Artist.name, db.Album.name).all(), albums = db.Album.query.join(db.Album.artist).order_by(db.Artist.name, db.Album.name).all())
tracks = db.Track.query.join(db.Track.album, db.Album.artist).order_by(db.Artist.name, db.Album.name, db.Track.disc, db.Track.number).all())
@app.route('/resetdb') @app.route('/resetdb')
def reset_db(): def reset_db():