diff --git a/tool/tagger.html b/tool/tagger.html index 453bf7e..62bde74 100644 --- a/tool/tagger.html +++ b/tool/tagger.html @@ -189,8 +189,14 @@ function isVideo(name) { // Which items this session presents. The server never filters: /media/{index} // and /api/tag both index the full list, so a shorter list here would show // item i of the album while tagging item i of the filtered set. +// Anything seen this session stays navigable even once it has tags. Without +// this, tagging an item removes it from the set and the left arrow jumps +// straight over your own work -- so a mis-tag is unreachable and the only way +// back is to restart without --untagged. +const visited = new Set(); + function shown(index) { - return !state.untagged_only || !state.files[index].keys.length; + return !state.untagged_only || !state.files[index].keys.length || visited.has(index); } function step(from, direction) { @@ -201,6 +207,7 @@ function step(from, direction) { } function draw() { + visited.add(at); const item = state.files[at]; document.getElementById("progress").textContent = `${at + 1} / ${state.files.length} — ${item.name}`;