From 0df2df3c50fdf75f40195893084c6a49d0b3384d Mon Sep 17 00:00:00 2001 From: j Date: Thu, 20 Jul 2017 15:35:56 +0200 Subject: [PATCH] update selected after upload subtitles --- pandora/archive/views.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pandora/archive/views.py b/pandora/archive/views.py index cad8e5a6..48ee3982 100644 --- a/pandora/archive/views.py +++ b/pandora/archive/views.py @@ -160,7 +160,11 @@ def upload(request, data=None): f.data.save('data.raw', request.FILES['file']) f.save() os.chmod(f.data.path, 0o644) - item.tasks.load_subtitles.delay(f.item.public_id) + item.update_selected() + if not item.rendered: + item.tasks.update_timeline.delay(f.item.public_id) + else: + item.tasks.load_subtitles.delay(f.item.public_id) response = json_response(text='file saved') else: response = json_response(status=403, text='permission denied')