forked from 0x2620/pandora
include cuts in clips json
This commit is contained in:
parent
2710571eb0
commit
fd220fc675
1 changed files with 2 additions and 1 deletions
|
@ -10,11 +10,11 @@ import subprocess
|
||||||
from urllib import quote
|
from urllib import quote
|
||||||
|
|
||||||
import ox
|
import ox
|
||||||
|
from ox.django.fields import TupleField
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.db import models, transaction
|
from django.db import models, transaction
|
||||||
from django.db.models import Max
|
from django.db.models import Max
|
||||||
from django.contrib.auth.models import User
|
from django.contrib.auth.models import User
|
||||||
from ox.django.fields import TupleField
|
|
||||||
|
|
||||||
from annotation.models import Annotation
|
from annotation.models import Annotation
|
||||||
from item.models import Item
|
from item.models import Item
|
||||||
|
@ -359,6 +359,7 @@ class Clip(models.Model):
|
||||||
if value:
|
if value:
|
||||||
data[key] = value
|
data[key] = value
|
||||||
data['duration'] = data['out'] - data['in']
|
data['duration'] = data['out'] - data['in']
|
||||||
|
data['cuts'] = tuple([c for c in self.item.get('cuts') if c > self.start and c < self.end])
|
||||||
return data
|
return data
|
||||||
|
|
||||||
class Position(models.Model):
|
class Position(models.Model):
|
||||||
|
|
Loading…
Reference in a new issue