mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-03 20:13:02 +00:00
add routes to get all albums and artists with sort
+ rewrite load all albums + artist logic with itertools.groupby + add a function to convert seconds to string
This commit is contained in:
+1
-5
@@ -67,11 +67,7 @@ def get_album_tracks_and_info():
|
||||
album.count = len(tracks)
|
||||
|
||||
album.get_date_from_tracks(tracks)
|
||||
|
||||
try:
|
||||
album.duration = sum(t.duration for t in tracks)
|
||||
except AttributeError:
|
||||
album.duration = 0
|
||||
album.duration = sum(t.duration for t in tracks)
|
||||
|
||||
album.check_is_single(tracks)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user