# HG changeset patch # User durandn # Date 1444229899 -7200 # Node ID 72d57da3cf5fc763578d81f01cc1ccbb64a55d93 # Parent 8129958e8dab16619be436557513bffbab727bc4 Corrected small issues with Segments and MultiSegments diff -r 8129958e8dab -r 72d57da3cf5f src/ldt/ldt/static/ldt/metadataplayer/Markers.js --- a/src/ldt/ldt/static/ldt/metadataplayer/Markers.js Wed Oct 07 12:59:35 2015 +0200 +++ b/src/ldt/ldt/static/ldt/metadataplayer/Markers.js Wed Oct 07 16:58:19 2015 +0200 @@ -459,7 +459,7 @@ var _annotation = this.selectedMarker, _url = Mustache.to_html(this.api_endpoint_template_edit, {annotation_id: this.selectedMarker ? this.selectedMarker.id : ""}); _annotation.source = _export - _annotation.description = this.$.find(".Ldt-Markers-MarkerTextArea").val(), /* Description field */ + _annotation.description = this.$.find(".Ldt-Markers-MarkerTextArea").val(); /* Description field */ } else { var _annotation = new IriSP.Model.Annotation(false, _export), diff -r 8129958e8dab -r 72d57da3cf5f src/ldt/ldt/static/ldt/metadataplayer/MultiSegments.js --- a/src/ldt/ldt/static/ldt/metadataplayer/MultiSegments.js Wed Oct 07 12:59:35 2015 +0200 +++ b/src/ldt/ldt/static/ldt/metadataplayer/MultiSegments.js Wed Oct 07 16:58:19 2015 +0200 @@ -27,7 +27,7 @@ }); this.source.getAnnotationTypes().forEach(function(_anntype) { var segments = _anntype.getAnnotations().filter(function(_ann) { - return _ann.getDuration() > 0; + return _ann.getDuration() > 0 && _ann.getMedia().id == _this.media.id; }); if (segments.length) { diff -r 8129958e8dab -r 72d57da3cf5f src/ldt/ldt/static/ldt/metadataplayer/Segments.js --- a/src/ldt/ldt/static/ldt/metadataplayer/Segments.js Wed Oct 07 12:59:35 2015 +0200 +++ b/src/ldt/ldt/static/ldt/metadataplayer/Segments.js Wed Oct 07 16:58:19 2015 +0200 @@ -37,10 +37,10 @@ this.width = this.$.parent().width(); this.$.css({ width : this.width + "px" }); } - var _list = this.getWidgetAnnotations().filter(function(_ann) { - return _ann.getDuration() > 0; - }), - _this = this, + var _this = this, + _list = this.getWidgetAnnotations().filter(function(_ann) { + return _ann.getDuration() > 0 && _ann.getMedia().id == _this.media.id; + }), _scale = this.width / this.source.getDuration(), list_$ = this.$.find('.Ldt-Segments-List'), lines = [],