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

change distinct following #208

This commit is contained in:
vincent 2021-01-07 20:18:25 +01:00
parent 0b67aeb070
commit c52141e5e9

View File

@ -7,7 +7,7 @@
from datetime import timedelta from datetime import timedelta
from flask import request from flask import request
from pony.orm import select, desc, avg, max, min, count, between from pony.orm import select, desc, avg, max, min, count, between, distinct
from ..db import ( from ..db import (
Folder, Folder,
@ -81,7 +81,7 @@ def album_list():
dict( dict(
album=[ album=[
a.as_subsonic_child(request.user) a.as_subsonic_child(request.user)
for a in query.distinct().random(size) for a in distinct(query.random(size))
] ]
), ),
) )