get file order from streams

This commit is contained in:
j 2018-05-09 18:39:06 +01:00
parent 6c1aa50ed2
commit 4cd1473a94

View file

@ -936,9 +936,10 @@ def download_source(request, id, part=None):
part = int(part) - 1 part = int(part) - 1
else: else:
part = 0 part = 0
if not item.files.all().count() > part: streams = item.streams()
if parts > len(streams):
raise Http404 raise Http404
f = item.files.all()[part] f = streams[part].file
if not f.data: if not f.data:
raise Http404 raise Http404