Skip to content

778 if a vtt or srt file is not valid in some way we should give a warning during import#820

Merged
Luke-Bilhorn merged 6 commits intodevfrom
778-if-a-vtt-or-srt-file-is-not-valid-in-some-way-we-should-give-a-warning-during-import
Mar 31, 2026
Merged

778 if a vtt or srt file is not valid in some way we should give a warning during import#820
Luke-Bilhorn merged 6 commits intodevfrom
778-if-a-vtt-or-srt-file-is-not-valid-in-some-way-we-should-give-a-warning-during-import

Conversation

@Fikitti
Copy link
Copy Markdown
Contributor

@Fikitti Fikitti commented Mar 30, 2026

Added a warning for user when importing corrupted vtt / srt files with not sequential time stamps which result and corrupted outcomes.

When time stamps are not sequential and currupted, user will be notified with yellow box stating the problem with the file during the import process. The user may still proceed.
@Fikitti Fikitti changed the base branch from main to dev March 31, 2026 08:21
Copy link
Copy Markdown
Collaborator

@BenjaminScholtens BenjaminScholtens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good works good

Copy link
Copy Markdown
Collaborator

@BenjaminScholtens BenjaminScholtens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's just make it give a warning any time things are out of order.

- Removed the OUT_OF_ORDER_THRESHOLD_SECONDS constant and adjusted the logic to flag any backward jumps in timestamps.
- Improved formatting of warning messages for better readability.
- Ensured that the validation function continues to provide accurate warnings for non-sequential timestamps in subtitle files.
- Changed the test case description to clarify that it now catches small overlaps from multi-speaker cues instead of ignoring them.
- Updated the test to check for specific warnings related to non-sequential timestamps, ensuring it captures cases with significant overlaps in speaker cues.
Copy link
Copy Markdown
Collaborator

@BenjaminScholtens BenjaminScholtens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good works good

Copy link
Copy Markdown
Contributor

@Luke-Bilhorn Luke-Bilhorn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good works good

@Luke-Bilhorn Luke-Bilhorn merged commit 469798d into dev Mar 31, 2026
6 checks passed
@Luke-Bilhorn Luke-Bilhorn deleted the 778-if-a-vtt-or-srt-file-is-not-valid-in-some-way-we-should-give-a-warning-during-import branch March 31, 2026 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

If a vtt or srt file is not valid in some way we should give a warning during import

3 participants