return webm for parts for now

This commit is contained in:
j 2011-08-17 19:26:10 +02:00
parent df2ec09e50
commit 2aad7ea984

View file

@ -653,11 +653,12 @@ def torrent(request, id, filename=None):
return response return response
def video(request, id, profile, index=None, format=None): def video(request, id, profile, index=None, format=None):
print id, profile, index, format
item = get_object_or_404(models.Item, itemId=id) item = get_object_or_404(models.Item, itemId=id)
if index: if index:
stream = item.streams.filter(profile=profile)[index] index = int(index) - 1
path = stream.video.path path = item.main_videos()[index].video.path
#stream = item.streams.filter(profile=profile)[index]
#path = stream.video.path
else: else:
stream = get_object_or_404(item.streams, profile="%s.%s" % (profile, format)) stream = get_object_or_404(item.streams, profile="%s.%s" % (profile, format))
path = stream.video.path path = stream.video.path