From 8f7a2094cdc07173ef492c14d0099cb7bd6434d3 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Sun, 24 Mar 2013 20:57:38 +0000 Subject: [PATCH] only user selected streams, update stream once chunk upload is done --- pandora/archive/models.py | 1 + pandora/item/views.py | 1 + 2 files changed, 2 insertions(+) diff --git a/pandora/archive/models.py b/pandora/archive/models.py index f7321d0a..1bec889d 100644 --- a/pandora/archive/models.py +++ b/pandora/archive/models.py @@ -266,6 +266,7 @@ class File(models.Model): f.write(chunk.read()) if done: stream.available = True + stream.info = {} stream.save() return True return False diff --git a/pandora/item/views.py b/pandora/item/views.py index cd034732..7a00b2a6 100644 --- a/pandora/item/views.py +++ b/pandora/item/views.py @@ -867,6 +867,7 @@ def video(request, id, resolution, format, index=None): #if streams.count() != 1: # reise Http404 streams = Stream.objects.filter(file__item__itemId=item.itemId, + file__selected=True, resolution=resolution, format=format).order_by('file__part', 'file__sort_path') if index + 1 > streams.count(): raise Http404