Skip to content

cli: allow --retry-streams to be set to 0 #6455

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 1 commit into from
Mar 2, 2025

Conversation

bastimeyer
Copy link
Member

@bastimeyer bastimeyer commented Mar 1, 2025

  • Don't retry fetching streams if --retry-streams and --retry-max are both set to zero. This was previously only possible if both were unset.
  • Update CLI argument help texts accordingly
  • Fix FatalPluginError not being handled properly on first try
  • Add tests for fetch_streams_with_retry()

Resolves #6454

Any comprehension issues with the updated help texts? They should be fine now IMO.
https://streamlink--6455.org.readthedocs.build/cli.html#cmdoption-retry-streams

""",
)
stream.add_argument(
"--retry-max",
metavar="COUNT",
type=num(int, ge=0),
help="""
When using --retry-streams, stop retrying the fetch after `COUNT` retry
attempt(s). Fetch will retry infinitely if `COUNT` is zero or unset.
Stop fetching the list of available streams after `COUNT` attempt(s).
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much for implementing the request.
In my opinion, for easier to understand documentation better using retry:

COUNT retry attempt(s)

- Don't retry fetching streams if `--retry-streams` and `--retry-max`
  are both set to zero. This was previously only possible if both
  were unset.
- Update CLI argument help texts accordingly
- Fix `FatalPluginError` not being handled properly on first try
- Add tests for `fetch_streams_with_retry()`
@bastimeyer bastimeyer force-pushed the cli/retry-streams-zero branch from c9efd09 to a5f2076 Compare March 2, 2025 12:28
@bastimeyer bastimeyer merged commit 140a969 into streamlink:master Mar 2, 2025
16 checks passed
@bastimeyer bastimeyer deleted the cli/retry-streams-zero branch March 2, 2025 12:34
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.

Extend the behavior of the CLI-argument "--retry-max" to disable retries altogether
2 participants