From 68844b6ed08276d8a6c297bc3e75af38396af5b1 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Fri, 26 Aug 2011 17:40:37 +0200 Subject: [PATCH] subtitles. search filenames --- pandora/archive/views.py | 1 + pandora/item/models.py | 1 + 2 files changed, 2 insertions(+) diff --git a/pandora/archive/views.py b/pandora/archive/views.py index ee3b0a54b..933c728a9 100644 --- a/pandora/archive/views.py +++ b/pandora/archive/views.py @@ -155,6 +155,7 @@ def upload(request): f.data.save('data.raw', request.FILES['file']) f.available = True f.save() + item.tasks.load_subtitles.delay(f.item.itemId) response = json_response(text='file saved') else: response = json_response(status=403, text='permissino denied') diff --git a/pandora/item/models.py b/pandora/item/models.py index 3edaa86e2..9df43c046 100644 --- a/pandora/item/models.py +++ b/pandora/item/models.py @@ -515,6 +515,7 @@ class Item(models.Model): #FIXME: qs = Annotation.objects.filter(layer__name='subtitles', item=self).order_by('start') save('subtitles', '\n'.join([l.value for l in qs])) + save('filename', '\n'.join([u'%s/%s' % (f.folder, f.name) for f in self.files.all()])) def update_sort(self): try: