1
0
mirror of https://github.com/spl0k/supysonic.git synced 2024-12-22 17:06:17 +00:00

duplicates in list_albums newest

This commit is contained in:
Денис Сперанский 2020-04-16 16:20:10 +03:00
parent 7417766ac5
commit 8014c7b2df

View File

@ -90,7 +90,7 @@ def album_list():
), ),
) )
elif ltype == "newest": elif ltype == "newest":
query = query.order_by(desc(Folder.created)) query = query.order_by(desc(Folder.created)).distinct()
elif ltype == "highest": elif ltype == "highest":
query = query.order_by(lambda f: desc(avg(f.ratings.rating))) query = query.order_by(lambda f: desc(avg(f.ratings.rating)))
elif ltype == "frequent": elif ltype == "frequent":