From 4cd1473a94852c73b192906509d44038eeb3fcc3 Mon Sep 17 00:00:00 2001 From: j Date: Wed, 9 May 2018 18:39:06 +0100 Subject: [PATCH] get file order from streams --- pandora/item/views.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pandora/item/views.py b/pandora/item/views.py index 853791ad7..05ac296f1 100644 --- a/pandora/item/views.py +++ b/pandora/item/views.py @@ -936,9 +936,10 @@ def download_source(request, id, part=None): part = int(part) - 1 else: part = 0 - if not item.files.all().count() > part: + streams = item.streams() + if parts > len(streams): raise Http404 - f = item.files.all()[part] + f = streams[part].file if not f.data: raise Http404