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

Workaround new pony QueryResult behaviour

Ref ponyorm/pony#369
This commit is contained in:
spl0k 2018-08-04 12:24:29 +02:00
parent b25e943e4e
commit 1b0cc54581

View File

@ -41,7 +41,7 @@ def old_search():
if offset + count > fcount: if offset + count > fcount:
toff = max(0, offset - fcount) toff = max(0, offset - fcount)
tend = offset + count - fcount tend = offset + count - fcount
res += tracks[toff : tend] res = res[:] + tracks[toff : tend][:]
return request.formatter('searchResult', dict( return request.formatter('searchResult', dict(
totalHits = folders.count() + tracks.count(), totalHits = folders.count() + tracks.count(),