forked from 0x2620/pandora
export layers as srt
This commit is contained in:
parent
7757582aaf
commit
9cc90ec245
4 changed files with 24 additions and 0 deletions
|
|
@ -1166,6 +1166,13 @@ class Item(models.Model):
|
|||
Clip.objects.filter(item=self, annotations__id=None).delete()
|
||||
self.update_find()
|
||||
|
||||
def srt(self, layer):
|
||||
return ox.srt.encode([{
|
||||
'in': a.start,
|
||||
'out': a.end,
|
||||
'value': a.value
|
||||
} for a in self.annotations.filter(layer=layer).order_by('start')])
|
||||
|
||||
def delete_item(sender, **kwargs):
|
||||
i = kwargs['instance']
|
||||
i.delete_files()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue