Skip to content

Conversation

@dhanuarf
Copy link
Contributor

@dhanuarf dhanuarf commented Aug 15, 2025

Previously when trying to submit a sponsorblock segment, if the time exceed 1 hour, the time conversion resulted in a wrong value and caused the segment to be submitted in the wrong place of the video

@dhanuarf

This comment was marked as outdated.

@FineFindus
Copy link
Collaborator

After thinking about it for a while, I dont think this is a refactor. But I'm not sure if it's a fix or a feat

It's a fix (it's not adding the ability to submit hours, but fixing the wrong parsing).

@dhanuarf
Copy link
Contributor Author

It's a fix (it's not adding the ability to submit hours, but fixing the wrong parsing).

Yeah. I was made confused by my own sentence

@dhanuarf dhanuarf force-pushed the fixsegmenttime branch 2 times, most recently from 5609264 to 0253b41 Compare August 15, 2025 23:35
@dhanuarf dhanuarf changed the title refactor(text parser): support hours digit when parsing time from string fix(sponsorblock): segment time not properly parsed if exceeds 1 hour Aug 15, 2025
Copy link
Member

@Bnyro Bnyro left a comment

Choose a reason for hiding this comment

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

I've replaced isDigitsOnly with all { isDigit() } so that we don't need to mock it to false by default and simplified the fix you proposed, see https://github.com/libre-tube/LibreTube/compare/0253b4193a1d15bbf843ab09400db9ab4c4a5855..1b3f3279de299852e2542e5faf6e420cf8c0adb3.

Thanks!

@Bnyro Bnyro merged commit 354efeb into libre-tube:master Aug 16, 2025
4 checks passed
@dhanuarf dhanuarf deleted the fixsegmenttime branch August 16, 2025 23:14
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.

3 participants