merging changes
This commit is contained in:
commit
52ad295485
1 changed files with 7 additions and 7 deletions
|
@ -494,12 +494,12 @@ class Stream(models.Model):
|
|||
for f in settings.VIDEO_FORMATS:
|
||||
derivative, created = Stream.objects.get_or_create(file=self.file,
|
||||
resolution=resolution, format=f)
|
||||
if created:
|
||||
derivative.source = self
|
||||
name = derivative.name()
|
||||
derivative.video.name = os.path.join(os.path.dirname(self.video.name), name)
|
||||
derivative.encode()
|
||||
derivative.save()
|
||||
if created:
|
||||
derivative.source = self
|
||||
name = derivative.name()
|
||||
derivative.video.name = os.path.join(os.path.dirname(self.video.name), name)
|
||||
derivative.encode()
|
||||
derivative.save()
|
||||
return True
|
||||
|
||||
def encode(self):
|
||||
|
@ -529,7 +529,7 @@ class Stream(models.Model):
|
|||
|
||||
def json(self):
|
||||
if settings.XSENDFILE or settings.XACCELREDIRECT:
|
||||
base_url = '/%s' % self.file.itemId
|
||||
base_url = '/%s' % self.file.item.itemId
|
||||
else:
|
||||
base_url = os.path.dirname(self.video.url)
|
||||
return {
|
||||
|
|
Loading…
Reference in a new issue