forked from 0x2620/pandora
avoid async, fails in python3.7
This commit is contained in:
parent
5cd106c08a
commit
7864ca1f70
2 changed files with 4 additions and 4 deletions
|
@ -1361,7 +1361,7 @@ class Item(models.Model):
|
|||
qs = qs.order_by('file__part', 'file__sort_path')
|
||||
return qs
|
||||
|
||||
def update_timeline(self, async=True):
|
||||
def update_timeline(self, async_=True):
|
||||
streams = self.streams()
|
||||
self.make_timeline()
|
||||
if streams.count() == 1:
|
||||
|
@ -1391,7 +1391,7 @@ class Item(models.Model):
|
|||
self.rendered = streams.count() > 0
|
||||
self.save()
|
||||
if self.rendered:
|
||||
if async:
|
||||
if async_:
|
||||
get_sequences.delay(self.public_id)
|
||||
else:
|
||||
get_sequences(self.public_id)
|
||||
|
|
|
@ -102,7 +102,7 @@ def update_timeline(public_id):
|
|||
item = models.Item.objects.get(public_id=public_id)
|
||||
except models.Item.DoesNotExist:
|
||||
return
|
||||
item.update_timeline(async=False)
|
||||
item.update_timeline(async_=False)
|
||||
Task.finish(item)
|
||||
|
||||
@task(queue="encoding")
|
||||
|
@ -111,7 +111,7 @@ def rebuild_timeline(public_id):
|
|||
i = models.Item.objects.get(public_id=public_id)
|
||||
for s in i.streams():
|
||||
s.make_timeline()
|
||||
i.update_timeline(async=False)
|
||||
i.update_timeline(async_=False)
|
||||
|
||||
@task(queue="encoding")
|
||||
def load_subtitles(public_id):
|
||||
|
|
Loading…
Reference in a new issue