Segments API now includes starting timecode. Necessary because annotations often start at 00:00
--- a/src/ldt/ldt/api/ldt/handlers.py Wed Sep 26 18:02:43 2012 +0200
+++ b/src/ldt/ldt/api/ldt/handlers.py Wed Sep 26 19:46:04 2012 +0200
@@ -281,9 +281,9 @@
content = content[0]
segments = Segment.objects.filter(content=content).filter(
- Q(start_ts__gt=begin, start_ts__lt=end) | # segment starts between begin and end
- Q(start_ts__gt=begin-F('duration'), start_ts__lt=end-F('duration')) |# segment ends between begin and end
- Q(start_ts__lt=begin, start_ts__gt=end-F('duration')) # period [begin:end] is included in the segment
+ Q(start_ts__gte=begin, start_ts__lte=end) | # segment starts between begin and end
+ Q(start_ts__gte=begin-F('duration'), start_ts__lte=end-F('duration')) |# segment ends between begin and end
+ Q(start_ts__lte=begin, start_ts__gte=end-F('duration')) # period [begin:end] is included in the segment
)
a = SegmentSerializer(content, segments)