yaz/commit
show occurence is tag list
author | Michiel Hildebrand |
---|---|
Mon Apr 23 15:28:42 2012 +0200 | |
committer | Michiel Hildebrand |
Mon Apr 23 15:28:42 2012 +0200 | |
commit | 041bf81aa2253e31de1794d179cf17a49c93d30e |
tree | 194b1400e7047496d13c8f6a9defac009c601658 |
parent | 190ac89ac61c11322fb010c68074dbd4d2418398 |
Diff style: patch stat
diff --git a/applications/yaz_player.pl b/applications/yaz_player.pl index eaa340a..fd9e185 100644 --- a/applications/yaz_player.pl +++ b/applications/yaz_player.pl @@ -308,7 +308,8 @@ html_video_page_yui(Video, Annotations, StartTime, Options) --> http_absolute_location(js('tagplayer/tagplayer.js'), Tagplayer, []), http_absolute_location(js('timeline/timeline.js'), Timeline, []), http_absolute_location(js('valueslider/valueslider.js'), Valueslider, []), - annotation_to_json(Annotations, JSONTags), + annotation_freq(Annotations, Annotations1), + annotation_to_json(Annotations1, JSONTags), list_limit(JSONTags, 50, JSONFrames, _) }, html_requires(js('videoplayer/swfobject.js')), @@ -391,6 +392,11 @@ html_video_page_yui(Video, Annotations, StartTime, Options) --> \js_call(fetchTagInfo(Query)) ]). +annotation_freq([], []). +annotation_freq([annotation(V,S,E,Es,_)|T], [annotation(V,S,E,Es,Count)|Rest]) :- + length(Es, Count), + annotation_freq(T, Rest). + js_toggle_options --> js_function([e], \[