From e02fd59f4310ac3fb2d3b5abb0378038dda8db6d Mon Sep 17 00:00:00 2001 From: AnimeDL Date: Sun, 16 Jul 2023 19:32:18 -0700 Subject: [PATCH] Add warning for pontially problematic subs --- modules/module.merger.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/module.merger.ts b/modules/module.merger.ts index 76944ce..42a34bc 100644 --- a/modules/module.merger.ts +++ b/modules/module.merger.ts @@ -83,7 +83,11 @@ class Merger { const shortestDuration = vnas[0].duration; for (const [vnaIndex, vna] of vnas.entries()) { //Don't calculate the shortestDuration track - if (vnaIndex == 0) continue; + if (vnaIndex == 0) { + if (!vna.isPrimary && vna.isPrimary !== undefined) + console.warn('Shortest video isn\'t primary, this might lead to problems with subtitles. Please report on github or discord if you experience issues.'); + continue; + } if (vna.duration && shortestDuration) { //Calculate the tracks delay vna.delay = Math.ceil((vna.duration-shortestDuration) * 1000) / 1000;