From 083fabc2087278af8e82c3b57e1e1453522aeefc Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Thu, 2 Apr 2015 13:43:46 +0200 Subject: [PATCH] include first annotation as annotation id for clips --- pandora/clip/models.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pandora/clip/models.py b/pandora/clip/models.py index be8ca2d0..d49f1639 100644 --- a/pandora/clip/models.py +++ b/pandora/clip/models.py @@ -98,6 +98,9 @@ class MetaClip: data['item'] = self.item.public_id data['in'] = self.start data['out'] = self.end + qs = self.annotations.all() + if qs.count(): + data['annotation'] = qs[0].public_id data['parts'] = self.item.json['parts'] data['durations'] = self.item.json['durations'] for key in ('title', 'director', 'year', 'videoRatio'):