compute clipId before clamping in/out

This commit is contained in:
j 2022-09-06 22:31:25 +02:00
parent fbf25b4c40
commit 2b7975ab89

View file

@ -201,7 +201,7 @@ async function loadClips(annotations) {
var previous var previous
annotations.forEach(annotation => { annotations.forEach(annotation => {
var clipId = annotation.id.split('/')[0] + '/' + annotation.in.toFixed(3) + '-'+ annotation.out.toFixed(3) var clipId = annotation.clipId
if (!colors[clipId]) { if (!colors[clipId]) {
return return
} }
@ -261,6 +261,7 @@ async function loadAnnotations(config) {
console.log("ERROR", config.item, layer, "missing", config.root) console.log("ERROR", config.item, layer, "missing", config.root)
} }
response.data.layers[layer] && response.data.layers[layer].forEach(annotation => { response.data.layers[layer] && response.data.layers[layer].forEach(annotation => {
annotation.clipId = annotation.id.split('/')[0] + '/' + annotation.in.toFixed(3) + '-'+ annotation.out.toFixed(3)
if (!(config.user && annotation.user != config.user) && isInside(config, annotation)) { if (!(config.user && annotation.user != config.user) && isInside(config, annotation)) {
annotations.push(annotation) annotations.push(annotation)
} }