forked from 0x2620/pandora
cleanup dangling clips
This commit is contained in:
parent
df9fc699ff
commit
07d5c9c79e
1 changed files with 3 additions and 0 deletions
|
@ -34,6 +34,7 @@ from data_api import external_data
|
||||||
|
|
||||||
from archive import extract
|
from archive import extract
|
||||||
from annotation.models import Annotation
|
from annotation.models import Annotation
|
||||||
|
from clip.models import Clip
|
||||||
import archive.models
|
import archive.models
|
||||||
|
|
||||||
from person.models import get_name_sort
|
from person.models import get_name_sort
|
||||||
|
@ -1103,6 +1104,8 @@ class Item(models.Model):
|
||||||
)
|
)
|
||||||
annotation.save()
|
annotation.save()
|
||||||
offset += f.duration
|
offset += f.duration
|
||||||
|
#remove left over clips without annotations
|
||||||
|
Clip.objects.filter(item=self, annotations__id=None).delete()
|
||||||
self.update_find()
|
self.update_find()
|
||||||
|
|
||||||
def delete_item(sender, **kwargs):
|
def delete_item(sender, **kwargs):
|
||||||
|
|
Loading…
Reference in a new issue