order videos

This commit is contained in:
j 2011-09-25 16:49:45 +02:00
parent 52df791560
commit c15b25b888

View file

@ -667,8 +667,8 @@ def video(request, id, resolution, format, index=None):
index = int(index) - 1
else:
index = 0
streams= Stream.objects.filter(file__item__itemId=item.itemId,
resolution=resolution, format=format)
streams = Stream.objects.filter(file__item__itemId=item.itemId,
resolution=resolution, format=format).order_by('file__part')
if index > streams.count():
raise Http404
stream = streams[index]