Skip to content

Commit

Permalink
Add warning for pontially problematic subs
Browse files Browse the repository at this point in the history
  • Loading branch information
AnimeDL committed Jul 17, 2023
1 parent 485433c commit e02fd59
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion modules/module.merger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e02fd59

Please sign in to comment.