mirror of
https://github.com/spl0k/supysonic.git
synced 2024-12-23 01:16:18 +00:00
Fixed playlist related errors
This commit is contained in:
parent
be47a259a8
commit
1488f29e9f
@ -76,7 +76,6 @@ class UserManager:
|
|||||||
store.find(RatingTrack, RatingTrack.user_id == user.id).remove()
|
store.find(RatingTrack, RatingTrack.user_id == user.id).remove()
|
||||||
store.find(ChatMessage, ChatMessage.user_id == user.id).remove()
|
store.find(ChatMessage, ChatMessage.user_id == user.id).remove()
|
||||||
for playlist in store.find(Playlist, Playlist.user_id == user.id):
|
for playlist in store.find(Playlist, Playlist.user_id == user.id):
|
||||||
playlist.tracks.clear()
|
|
||||||
store.remove(playlist)
|
store.remove(playlist)
|
||||||
|
|
||||||
store.remove(user)
|
store.remove(user)
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
<tr><th>Artist</th><th>Title</th><th>Album</th><th>Length</th></tr>
|
<tr><th>Artist</th><th>Title</th><th>Album</th><th>Length</th></tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for t in playlist.tracks %}
|
{% for t in playlist.get_tracks() %}
|
||||||
<tr><td>{{ t.album.artist.name }}</td><td>{{ t.title }}</td><td>{{ t.album.name }}</td><td>{{ t.duration_str() }}</td></tr>
|
<tr><td>{{ t.album.artist.name }}</td><td>{{ t.title }}</td><td>{{ t.album.name }}</td><td>{{ t.duration_str() }}</td></tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
{% for p in mine %}
|
{% for p in mine %}
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="{{ url_for('playlist_details', uid = p.id) }}">{{ p.name }}</a></td>
|
<td><a href="{{ url_for('playlist_details', uid = p.id) }}">{{ p.name }}</a></td>
|
||||||
<td>{{ p.tracks.count() }}</td>
|
<td>{{ p.get_tracks()|length }}</td>
|
||||||
<td>{% if p.public %}<span class="glyphicon glyphicon-check"
|
<td>{% if p.public %}<span class="glyphicon glyphicon-check"
|
||||||
aria-label="Public playlist"></span>{% else %}<span
|
aria-label="Public playlist"></span>{% else %}<span
|
||||||
class="glyphicon glyphicon-unchecked"
|
class="glyphicon glyphicon-unchecked"
|
||||||
@ -52,7 +52,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td><a href="{{ url_for('playlist_details', uid = p.id) }}">{{ p.name }}</a></td>
|
<td><a href="{{ url_for('playlist_details', uid = p.id) }}">{{ p.name }}</a></td>
|
||||||
<td>{{ p.user.name }}</td>
|
<td>{{ p.user.name }}</td>
|
||||||
<td>{{ p.tracks.count() }}</td>
|
<td>{{ p.get_tracks()|length }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
Loading…
Reference in New Issue
Block a user