-
-
Notifications
You must be signed in to change notification settings - Fork 485
Obtain stream length as a Duration #1106
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
base: dev
Are you sure you want to change the base?
Conversation
5c3115b
to
534e2a3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know what the policy around breaking changes is anymore, otherwise it looks fine. But it should be at least mentioned that its a breaking change in the PR itself
extractor/src/main/java/org/schabi/newpipe/extractor/stream/StreamInfoItem.java
Outdated
Show resolved
Hide resolved
extractor/src/main/java/org/schabi/newpipe/extractor/stream/StreamInfoItemExtractor.java
Show resolved
Hide resolved
extractor/src/main/java/org/schabi/newpipe/extractor/localization/TimeAgoParser.java
Outdated
Show resolved
Hide resolved
extractor/src/main/java/org/schabi/newpipe/extractor/stream/StreamInfoItem.java
Show resolved
Hide resolved
extractor/src/main/java/org/schabi/newpipe/extractor/stream/StreamInfoItem.java
Outdated
Show resolved
Hide resolved
534e2a3
to
335875d
Compare
I made some changes, this should no longer break existing uses of the methods. |
3111454
to
0261e63
Compare
0261e63
to
ed02dd8
Compare
I don't know if this PR is a good idea. While it's true that the correct data type would be What do others think? Is it worth the effort to switch to E.g. in NewPipe we would need to change the database to properly adapt to this PR, which feels like a risky move without any advantage, which means in NewPipe we wouldn't really switch to using |
Extract stream lengths as
Duration
values.Duration
provides convenience methods for converting to/from different time units, e.g. seconds, hours, etc.Note: Previously, the existing methods' types were updated to
Duration
, which would have required changes in existing uses. To maintain compatibility, this PR has been updated to retain the existing methods and update them to call the new methods.