yaz/commit

FIX use endtime in URL of fragment

authorMichiel Hildebrand
Wed Nov 9 10:37:58 2011 +0100
committerMichiel Hildebrand
Wed Nov 9 10:37:58 2011 +0100
commit1c893d2b96655f640737c8d92d1f0e9bdba410d5
tree2236ad97e6956e77ff939bbe12cb38498e063a54
parent89f4d2ac54eefc9f393e4a228244161eb05e60df
Diff style: patch stat
diff --git a/api/edm_export.pl b/api/edm_export.pl
index c5f0e5e..31eb9ab 100644
--- a/api/edm_export.pl
+++ b/api/edm_export.pl
@@ -238,10 +238,12 @@ annotations_to_edm([A|As], Video, Source, Proxy, Triples) :-
 	annotation_value(Tag, _TagObject, Label),
 	annotations_to_edm(As, Video, Source, Proxy, Rest).
 annotations_to_edm([A|As], Video, Source, Proxy, Triples) :-
-	A = shot_annotation(Shot, Start, Duration, Values),
+	A = shot_annotation(Shot, Start, Duration0, Values),
 	!,
 	StartTime is round(Start/1000),
-	fragment_url(Source, StartTime, Duration, ShotSource),
+	Duration is round(Duration0/1000),
+	EndTime is Start+Duration,
+	fragment_url(Source, StartTime, EndTime, ShotSource),
 	prefix_url(Shot, 'proxy/', ShotProxy),
 	shot_annotations_to_edm(Values, ShotProxy, Annotations),
 	rdf_global_term([ rdf(Proxy, ma:hasFragment, ShotProxy),