From fd220fc675ce26adfe5ac886dab8a0cc650421e2 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Thu, 18 Jul 2013 10:42:40 +0000 Subject: [PATCH] include cuts in clips json --- pandora/edit/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pandora/edit/models.py b/pandora/edit/models.py index c8cbc96a7..c294aacc7 100644 --- a/pandora/edit/models.py +++ b/pandora/edit/models.py @@ -10,11 +10,11 @@ import subprocess from urllib import quote import ox +from ox.django.fields import TupleField from django.conf import settings from django.db import models, transaction from django.db.models import Max from django.contrib.auth.models import User -from ox.django.fields import TupleField from annotation.models import Annotation from item.models import Item @@ -359,6 +359,7 @@ class Clip(models.Model): if value: data[key] = value 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 class Position(models.Model):