Update Stream string representation and refactor to_url + JSON data#4521
Merged
back-to merged 2 commits intoMay 13, 2022
Merged
Conversation
- Move stream.http.valid_args to HTTPSession.valid_request_args - Add HTTPSession.prepare_new_request - Update HTTPStream - Use newly added HTTPSession methods - Fix HLSStream - Prepare master URL appropriately - Fix DASHStream - Return correct JSON data, depending whether manifest URL exists - Filter custom args in DASHStream.parse_manifest - Use HTTPSession.prepare_new_request in plugins.twitch.UsherService - Rewrite Stream JSON tests and move test module
- Change format of Stream string representations and error messages of `to_url` and `to_manifest_url` - Don't override `__repr__` in `Stream` subclasses - Raise TypeError if url or manifest URL is None - Fix CLI - Abort passthrough if stream can't be translated to URL - Remove unneeded streamlink_cli.utils.stream module - Rewrite stream URL tests - Move FilmOnHLS stream URL tests to plugin test module (and rewrite)
9791623 to
51bd393
Compare
Billy2011
added a commit
to Billy2011/streamlink-27
that referenced
this pull request
May 14, 2022
…4521) plugin.api.http_session: add prepare_new_request - Move stream.http.valid_args to HTTPSession.valid_request_args - Add HTTPSession.prepare_new_request - Update HTTPStream - Use newly added HTTPSession methods - Fix HLSStream - Prepare master URL appropriately - Fix DASHStream - Return correct JSON data, depending whether manifest URL exists - Filter custom args in DASHStream.parse_manifest - Use HTTPSession.prepare_new_request in plugins.twitch.UsherService - Rewrite Stream JSON tests and move test module
Billy2011
added a commit
to Billy2011/streamlink-27
that referenced
this pull request
May 14, 2022
…#4521) - Change format of Stream string representations and error messages of `to_url` and `to_manifest_url` - Don't override `__repr__` in `Stream` subclasses - Raise TypeError if url or manifest URL is None - Fix CLI - Abort passthrough if stream can't be translated to URL - Remove unneeded streamlink_cli.utils.stream module - Rewrite stream URL tests - Move FilmOnHLS stream URL tests to plugin test module (and rewrite)
Billy2011
added a commit
to Billy2011/streamlink-27
that referenced
this pull request
May 14, 2022
…4521) plugin.api.http_session: add prepare_new_request - Move stream.http.valid_args to HTTPSession.valid_request_args - Add HTTPSession.prepare_new_request - Update HTTPStream - Use newly added HTTPSession methods - Fix HLSStream - Prepare master URL appropriately - Fix DASHStream - Return correct JSON data, depending whether manifest URL exists - Filter custom args in DASHStream.parse_manifest - Use HTTPSession.prepare_new_request in plugins.twitch.UsherService - Rewrite Stream JSON tests and move test module
Billy2011
added a commit
to Billy2011/streamlink-27
that referenced
this pull request
May 14, 2022
…#4521) - Change format of Stream string representations and error messages of `to_url` and `to_manifest_url` - Don't override `__repr__` in `Stream` subclasses - Raise TypeError if url or manifest URL is None - Fix CLI - Abort passthrough if stream can't be translated to URL - Remove unneeded streamlink_cli.utils.stream module - Rewrite stream URL tests - Move FilmOnHLS stream URL tests to plugin test module (and rewrite)
snorkelopstesting3-bot
pushed a commit
to snorkel-marlin-repos/streamlink_streamlink_pr_4521_c38058fc-c202-4283-b4d7-47cd8a2673aa
that referenced
this pull request
Oct 22, 2025
Original PR #4521 by bastimeyer Original: streamlink/streamlink#4521
snorkelopstesting4-web
added a commit
to snorkel-marlin-repos/streamlink_streamlink_pr_4521_c38058fc-c202-4283-b4d7-47cd8a2673aa
that referenced
this pull request
Oct 22, 2025
…or to_url + JSON data Merged from original PR #4521 Original: streamlink/streamlink#4521
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #4518
Not a perfect solution, but this should improve the
Streamstring representations a bit, as it now always includes the class name and shortname.This PR also fixes a couple of bugs:
The first commit was needed in order to clean up some of the
to_urllogic in HTTPStream, HLSStream and DASHStream.