Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix parsing for timestamps with commas as decimal seperators #545

Merged
merged 1 commit into from
Jul 2, 2024

Conversation

Dananji
Copy link
Collaborator

@Dananji Dananji commented Jul 1, 2024

Related issue: #539

SRT allows commas as decimal separators in the timestamps. e.g.

17
00:00:42,540 --> 00:00:45,420
We provide uncompromising quality,

When using content search on these transcripts in Avalon's search response is formatted as follows;

 id: "https://avalon-dev.dlib.indiana.edu/media_objects/g158bh28p/manifest/canvas/2f75r800tsearch/0cb75a80-062e-4315-b361-144f6af7f958",
 type: "Annotation",
 motivation: "supplementing",
 body: {
   type: "TextualBody",
   value: "<em>We</em> provide uncompromising quality,",
   format: "text/plain",
 },
 target: "https://avalon-dev.dlib.indiana.edu/master_files/2f75r800t/supplemental_files/298transcripts#t=00:00:42.540,00:00:45,420"

The timestamps contain multiple commas, which resulted in incorrect timestamps when parsing the response.

Copy link
Member

@cjcolvar cjcolvar 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!

@Dananji Dananji merged commit 890adea into main Jul 2, 2024
2 checks passed
@Dananji Dananji deleted the srt-search branch July 2, 2024 19:21
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.

2 participants