1
0
Fork 0
mirror of https://github.com/sussy-code/smov.git synced 2024-12-29 16:07:40 +01:00

add 50 temporary sections to thumbnail scraper

This commit is contained in:
mrjvs 2023-10-21 05:48:56 +02:00
parent c53dd741d3
commit 3f9f072ab7

View file

@ -88,7 +88,10 @@ class ThumnbnailWorker {
// TODO make a queue based on refinement algorithm
const queue = [0.5, 0, 1, 0.25, 0.75];
const sections = 50;
const queue = Array(sections + 1)
.fill(0)
.map((_, i) => i / sections);
for (let i = 0; i < queue.length; i += 1) {
if (this.interrupted) return;
await this.takeSnapshot(vid.duration * queue[i]);