fix(Utils): Properly parse timestamps with thousands separators #363
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Channels like Lofi Girl have 24/7 live streams, so when they end, the timestamps are massive https://www.youtube.com/@LofiGirl/streams, so long that they have a thousands separator for the hours. Currently the timestamp parsing can't handle the thousands separator. For this timestamp
20,843:43:51
, instead of seeing it as having20843
hours it instead only takes the digits before the separator, so20
hours, the result being that the seconds duration on Video objects is a lot smaller than it should be.This pull request removes any non digit characters before parsing the strings into numbers.
Type of change
Checklist: