Skip to content
Snippets Groups Projects
Commit c0f6e959 authored by ale's avatar ale
Browse files

show ready/duplicate songs in about

parent 6deb54be
No related branches found
No related tags found
No related merge requests found
......@@ -11,5 +11,10 @@
<b>{{ num_songs }}</b> songs
(<b>{{ used_gb }}</b> Gb).
</p>
{% if dup_songs %}
<p>
<b>{{ dup_songs }}</b> duplicates found.
</p>
{% endif %}
{% endblock %}
......@@ -38,11 +38,13 @@ def songs_fragment():
@app.route('/about')
@require_auth
def about():
num_songs = MP3.query.filter_by(error=False).count()
num_songs = MP3.query.filter_by(state=MP3.READY).count()
dup_songs = MP3.query.filter_by(state=MP3.DUPLICATE).count()
used_gb = int(Session.query(func.sum(MP3.size)).first()[0] / (2 << 29))
num_users = User.query.filter_by(active=True).count()
return render_template('about.html', num_users=num_users,
num_songs=num_songs, used_gb=used_gb)
num_songs=num_songs, used_gb=used_gb,
dup_songs=dup_songs)
@app.route('/')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment