subtitles. search filenames
This commit is contained in:
parent
f124c1b2e1
commit
68844b6ed0
2 changed files with 2 additions and 0 deletions
|
@ -155,6 +155,7 @@ def upload(request):
|
||||||
f.data.save('data.raw', request.FILES['file'])
|
f.data.save('data.raw', request.FILES['file'])
|
||||||
f.available = True
|
f.available = True
|
||||||
f.save()
|
f.save()
|
||||||
|
item.tasks.load_subtitles.delay(f.item.itemId)
|
||||||
response = json_response(text='file saved')
|
response = json_response(text='file saved')
|
||||||
else:
|
else:
|
||||||
response = json_response(status=403, text='permissino denied')
|
response = json_response(status=403, text='permissino denied')
|
||||||
|
|
|
@ -515,6 +515,7 @@ class Item(models.Model):
|
||||||
#FIXME:
|
#FIXME:
|
||||||
qs = Annotation.objects.filter(layer__name='subtitles', item=self).order_by('start')
|
qs = Annotation.objects.filter(layer__name='subtitles', item=self).order_by('start')
|
||||||
save('subtitles', '\n'.join([l.value for l in qs]))
|
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):
|
def update_sort(self):
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in a new issue