Compare commits

..

No commits in common. "cb55ebaf4cf8097f87de1e46869ca5e90c9ad9aa" and "eee9e19841020783435f2358c086186f2538effd" have entirely different histories.

2 changed files with 3 additions and 15 deletions

View file

@ -117,8 +117,7 @@ class MetaClip(object):
#annotations = self.annotations.filter(layer__in=settings.CONFIG['clipLayers']) #annotations = self.annotations.filter(layer__in=settings.CONFIG['clipLayers'])
annotations = self.annotations.all() annotations = self.annotations.all()
if qs: if qs:
for q in qs: annotations = annotations.filter(qs)
annotations = annotations.filter(q)
entity_cache = {} entity_cache = {}
j['annotations'] = [ j['annotations'] = [
a.json(keys=['value', 'id', 'layer'], entity_cache=entity_cache) for a in annotations a.json(keys=['value', 'id', 'layer'], entity_cache=entity_cache) for a in annotations

View file

@ -105,17 +105,6 @@ pandora.ui.exportAnnotationsDialog = function(options) {
updateLink(); updateLink();
} }
function textBlob(data) {
data = Ox.encodeUTF8(data);
var byteNumbers = new Array(data.length);
for (var i = 0; i < data.length; i++) {
byteNumbers[i] = data.charCodeAt(i);
}
var byteArray = new Uint8Array(byteNumbers);
var blob = new Blob([byteArray], {type: 'text/plain; charset=utf-8'});
return blob;
}
function updateLink() { function updateLink() {
var layer = $layerSelect.value(), var layer = $layerSelect.value(),
format = $formatSelect.value(), format = $formatSelect.value(),
@ -132,11 +121,11 @@ pandora.ui.exportAnnotationsDialog = function(options) {
text: text text: text
}; };
}), }),
blob = textBlob( blob = new Blob([Ox.encodeUTF8(
format == 'json' format == 'json'
? JSON.stringify(items, null, ' ') ? JSON.stringify(items, null, ' ')
: Ox.formatSRT(items) : Ox.formatSRT(items)
), )], {type: 'text/plain; charset=utf-8'}),
url = window.URL.createObjectURL(blob); url = window.URL.createObjectURL(blob);
$link.attr({ $link.attr({