Skip to content

stream.dash: refactor #5221

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

Merged
merged 6 commits into from
Mar 6, 2023
Merged

Conversation

bastimeyer
Copy link
Member

Motivation of each change in the commit messages...

Don't fetch recursively, just pass the `retries` parameter to `get()`
Add overloaded typing information to `MPDNode.attr()` to be able to
have more precise typing of return values. Return values of required
attributes are still typed as optional and need to be overridden.

Also change the order of parameters.
- Fix order of `*args` and keywords
- Remove `*args` from `MPDNode`
- Capture `node`, `root` and `parent` in `*args` and `**kwargs`
- TODO/PEP570: set positional-only and keyword-only parameters (py38)
- Add typing annotations to all `MPDNode` children
- Fix various typing issues
  - Override optional types of required attributes
  - Add checks for optional stuff in segment processing
  - Fix processing of empty node texts
  - Fix typing in `DASHStream` caused by enabling typing in `MPDNode`s
@gravyboat gravyboat merged commit 236116b into streamlink:master Mar 6, 2023
@bastimeyer bastimeyer deleted the stream/dash/refactor branch March 6, 2023 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants