Skip to content

Fix parsing for timestamps with commas as decimal seperators - #545

Merged
Dananji merged 1 commit into
mainfrom
srt-search
Jul 2, 2024
Merged

Fix parsing for timestamps with commas as decimal seperators#545
Dananji merged 1 commit into
mainfrom
srt-search

Conversation

@Dananji

@Dananji Dananji commented Jul 1, 2024

Copy link
Copy Markdown
Collaborator

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.

@cjcolvar cjcolvar left a comment

Copy link
Copy Markdown
Member

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