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 SponsorBlock zero videoDuration bug #23

Merged
merged 2 commits into from
Dec 4, 2022

Conversation

iBicha
Copy link
Owner

@iBicha iBicha commented Dec 3, 2022

Fixes a bug where SponsorBlock reports that the video has a duration of zero.

Reported from Reddit https://www.reddit.com/r/selfhosted/comments/zb07p0/comment/iyq52av/?utm_source=share&utm_medium=web2x&context=3

@iBicha
Copy link
Owner Author

iBicha commented Dec 3, 2022

Although the current fix is to skip segments with videoDuration = 0, the official SponsorBlock extension does not skip it.
Will change the approach to use the actual video duration instead.

@iBicha iBicha mentioned this pull request Dec 3, 2022
@iBicha
Copy link
Owner Author

iBicha commented Dec 4, 2022

Added a follow up task to this in the roadmap, this fix should do for now

@iBicha iBicha marked this pull request as ready for review December 4, 2022 00:43
@iBicha iBicha merged commit 08dd620 into main Dec 4, 2022
@iBicha iBicha deleted the fix/sponsor-block-zero-duration branch December 4, 2022 00:43
@mchangrh
Copy link

VideoDuration is not checked locally since it has been unreliable, as you have witnessed first hand. Segments are displayed regardless and if there's a detected duration mismatch when it's checked, the server will hide segments and not send them to any clients.

@iBicha
Copy link
Owner Author

iBicha commented Feb 15, 2023

VideoDuration is not checked locally since it has been unreliable, as you have witnessed first hand. Segments are displayed regardless and if there's a detected duration mismatch when it's checked, the server will hide segments and not send them to any clients.

@mchangrh from the docs

videoDuration: float // Duration of video when submission occurred (to be used to determine when a submission is out of date). 0 when unknown. +- 1 second

Should I ignore the videoDuration field entirely?

@mchangrh
Copy link

Yes, I wrote those docs. It was used briefly for the client and it's still used on the server side but it's unreliable for use in clients but retained for backwards compatibility. I would suggest you ignore the field entirely

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