From faeb2ddd2d625d52c58f973bde781ef6dcc7e34e Mon Sep 17 00:00:00 2001 From: j Date: Tue, 12 Nov 2019 11:40:14 +0000 Subject: [PATCH] document folded annotations, include clip_id in annots --- pandora/annotation/models.py | 2 ++ pandora/clip/views.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pandora/annotation/models.py b/pandora/annotation/models.py index 470af3580..0326e37dc 100644 --- a/pandora/annotation/models.py +++ b/pandora/annotation/models.py @@ -378,6 +378,8 @@ class Annotation(models.Model): streams = self.item.streams() if streams: j['videoRatio'] = streams[0].aspect_ratio + if 'clip' in keys: + j[key] = self.clip.public_id for key in keys: if key not in j: if key in self._clip_keys: diff --git a/pandora/clip/views.py b/pandora/clip/views.py index 700a95a15..7c2fcd231 100644 --- a/pandora/clip/views.py +++ b/pandora/clip/views.py @@ -78,7 +78,7 @@ def findClips(request, data): takes { query: object, // find clips, query object, see `find` itemsQuery: object, // limit to matching items, query object, see `find` - keys: [string], // list of properties to return + keys: [string], // list of properties to return, include 'annotations' to get all annotations for a clip positions: [int], // list of positions range: [int, int], // range of results to return sort: [object] // list of sort objects, see `find`