bastimeyer · GitHub

@bastimeyer added CLI WIP

Work in process

labels

Apr 9, 2025

@bastimeyer

Merged

@bastimeyer

- Add `ConsoleOutput.msg_status()` method for writing status messages
  to the console output, if supported by the output stream
- Implement line-buffered `ConsoleOutputStream` which handles all
  writes to the console output and which doesn't support status messages
- Implement `ConsoleOutputStreamANSI` with support for status messages
  via ANSI control sequences
- Add feature detection to the `ConsoleOutputStream` constructor,
  so the right class is instantiated automatically
Next: Add support for the "classic Windows Console" APIs
Add support for "classic Windows Console" APIs that allow
the implementation of status messages without ANSI control sequences.
- Pass the `ConsoleOutput` instance to `Progress`, as well as
  the output file path, and pass an optional `Progress` instance
  to `StreamRunner` instead of instantiating it there
- Make `Progress` call the newly added `ConsoleOutput.msg_status()`
  method for each progress status update message instead of writing
  messages to `stderr` and adding whitespace padding to each line
NEXT:
If `--progress=force` is set, make `Progress` write non-status messages
to the console output in a slower interval
Restore the `--progress=force` functionality by making it write
non-status messages to the console output if the console output
doesn't support status messages (not a TTY stream). In this case,
increase the update interval from 0.25 seconds to 2 seconds, so the
regular console output doesn't get spammed by the download progress.

@bastimeyer

@bastimeyer

@bastimeyer

@bastimeyer

snorkelopstesting2-coder pushed a commit to snorkel-marlin-repos/streamlink_streamlink_pr_6497_5c787654-e129-4520-9917-0f335175d58c that referenced this pull request

Oct 22, 2025

Shallow Copy Bot

Merged

snorkelopstesting4-web added a commit to snorkel-marlin-repos/streamlink_streamlink_pr_6497_5c787654-e129-4520-9917-0f335175d58c that referenced this pull request

Oct 22, 2025

Read the original on github.com ↗