equal
deleted
inserted
replaced
48 // to jquery sparkline. Otherwise, compute it ourselves. |
48 // to jquery sparkline. Otherwise, compute it ourselves. |
49 if (!IriSP.null_or_undefined(stat_view)) { |
49 if (!IriSP.null_or_undefined(stat_view)) { |
50 //console.log("sparklinewidget : using stats embedded in the json"); |
50 //console.log("sparklinewidget : using stats embedded in the json"); |
51 var _results = stat_view.meta.stat.split(","); |
51 var _results = stat_view.meta.stat.split(","); |
52 } else { |
52 } else { |
53 var _annotations = this._serializer._data.annotations, |
53 var _annotations = this._serializer._data.annotations; |
54 _sliceDuration = Math.floor( this.duration / this.slices), |
54 if (this.cinecast_version) { |
|
55 _annotations = _(_annotations).filter(function(_a) { |
|
56 return _a.type !== "cinecast:MovieExtract"; |
|
57 }); |
|
58 } |
|
59 var _sliceDuration = Math.floor( this.duration / this.slices), |
55 _results = _(_.range(this.slices)).map(function(_i) { |
60 _results = _(_.range(this.slices)).map(function(_i) { |
56 return _(_annotations).filter(function(_a){ |
61 return _(_annotations).filter(function(_a){ |
57 return (_a.begin <= (1 + _i) * _sliceDuration) && (_a.end >= _i * _sliceDuration) |
62 return (_a.begin <= (1 + _i) * _sliceDuration) && (_a.end >= _i * _sliceDuration) |
58 }).length; |
63 }).length; |
59 }); |
64 }); |