fix stream uploads

This commit is contained in:
j 2014-04-11 19:34:15 +00:00
parent 14315455da
commit fcbe552de3

View file

@ -324,7 +324,14 @@ class File(models.Model):
stream, created = Stream.objects.get_or_create(
file=self, resolution=resolution, format=format)
name = stream.path(stream.name())
return save_chunk(stream, stream.media, chunk, offset, name)
def done_cb():
if done:
stream.available = True
stream.info = {}
stream.save()
return True, stream.media.size
return save_chunk(stream, stream.media, chunk, offset, name, done_cb)
return False, 0
def stream_resolution(self):