Thanks to visit codestin.com
Credit goes to github.com

Skip to content

session: deprecate options for spec. stream types#3893

Merged
back-to merged 1 commit into
streamlink:masterfrom
bastimeyer:session/deprecate-stream-type-options
Jul 31, 2021
Merged

session: deprecate options for spec. stream types#3893
back-to merged 1 commit into
streamlink:masterfrom
bastimeyer:session/deprecate-stream-type-options

Conversation

@bastimeyer

@bastimeyer bastimeyer commented Jul 30, 2021

Copy link
Copy Markdown
Member

Having multiple session options and CLI arguments for different stream
types which are already covered by generic options/arguments is not only
redundant, but also confusing.

A distinction between different stream types does only make sense when
multiple different stream types are available and the user needs to
explicitly set different values for each of them, but since it's not
always clear which stream type is returned when a stream is selected
via the "best" stream name synonym for example, this makes it even more
confusing. And it's redundant as well, since only one stream can be
selected anyway.

  • deprecate {dash,hds,hls}-segment-attempts
    in favor of stream-segment-attempts
  • deprecate {dash,hds,hls}-segment-threads
    in favor of stream-segment-threads
  • deprecate {dash,hds,hls}-segment-timeout
    in favor of stream-segment-timeout
  • deprecate {dash,hds,hls,rtmp,http-stream}-timeout
    in favor of stream-timeout (dash/http-stream were never used)
  • fix HTTPStream and use stream-timeout instead of http-timeout
  • suppress deprecated CLI arguments
  • update help texts of generic CLI arguments
  • fix docs and add entry to deprecations page

  1. Do we need tests for the option/argument name translations?
  2. The "Stream transport options" section in the docs needs to be reordered/improved. In a separate PR.
  3. hls-segment-stream-data should be removed as well and just set to True. In a separate PR.

Comment thread src/streamlink/session.py Outdated
Having multiple session options and CLI arguments for different stream
types which are already covered by generic options/arguments is not only
redundant, but also confusing.

A distinction between different stream types does only make sense when
multiple different stream types are available and the user needs to
explicitly set different values for each of them, but since it's not
always clear which stream type is returned when a stream is selected
via the "best" stream name synonym for example, this makes it even more
confusing. And it's redundant as well, since only one stream can be
selected anyway.

- deprecate `{dash,hds,hls}-segment-attempts`
  in favor of `stream-segment-attempts`
- deprecate `{dash,hds,hls}-segment-threads`
  in favor of `stream-segment-threads`
- deprecate `{dash,hds,hls}-segment-timeout`
  in favor of `stream-segment-timeout`
- deprecate `{dash,hds,hls,rtmp,http-stream}-timeout`
  in favor of `stream-timeout` (dash/http-stream were never used)
- fix `HTTPStream` and use `stream-timeout` instead of `http-timeout`
- suppress deprecated CLI arguments
- update help texts of generic CLI arguments
- fix docs and add entry to deprecations page
@bastimeyer bastimeyer force-pushed the session/deprecate-stream-type-options branch from 2799909 to 4405792 Compare July 31, 2021 06:40
@back-to back-to merged commit e253c4b into streamlink:master Jul 31, 2021
@bastimeyer bastimeyer deleted the session/deprecate-stream-type-options branch July 31, 2021 21:30
Billy2011 added a commit to Billy2011/streamlink-27 that referenced this pull request Aug 1, 2021
…#3893)

Having multiple session options and CLI arguments for different stream
types which are already covered by generic options/arguments is not only
redundant, but also confusing.

A distinction between different stream types does only make sense when
multiple different stream types are available and the user needs to
explicitly set different values for each of them, but since it's not
always clear which stream type is returned when a stream is selected
via the "best" stream name synonym for example, this makes it even more
confusing. And it's redundant as well, since only one stream can be
selected anyway.

- deprecate `{dash,hds,hls}-segment-attempts`
  in favor of `stream-segment-attempts`
- deprecate `{dash,hds,hls}-segment-threads`
  in favor of `stream-segment-threads`
- deprecate `{dash,hds,hls}-segment-timeout`
  in favor of `stream-segment-timeout`
- deprecate `{dash,hds,hls,rtmp,http-stream}-timeout`
  in favor of `stream-timeout` (dash/http-stream were never used)
- fix `HTTPStream` and use `stream-timeout` instead of `http-timeout`
- suppress deprecated CLI arguments
- update help texts of generic CLI arguments
- fix docs and add entry to deprecations page
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