cli: implement --player-external-http-continuous#4739
Conversation
|
Of the two paths listed here I'd have to lean towards the former (renamed to be in spec with the rest of the command schema of course), though I'm not too much a fan of either for the reasons listed above. As is I think there is potential for a larger rework of of how the server option tree is handled, but that's beyond the scope of this particular PR. My reasoning is:
|
Hm, that's not consistent with
Yes. After Livestreamer got forked into Streamlink, the CLI was never cleaned up and it's a total mess of historically grown features built on top of each other over several years by lots of different contributors. That's why nobody has tried refactoring or rebuilding the CLI package, and it's still a mess today. And starting from scratch is even more difficult if feature parity needs to be achieved without introducing (many) breaking changes. One feature in regards to the external http server for example was being able to serve multiple clients at once, but implementing this on top of the current code just doesn't make sense from a maintenance perspective.
I think this has been avoided intentionally when it was implemented, because optional argument values are a bit weird. The argument could be changed to |
Resolves #4738
No tests, because no tests have ever been written for
output_stream_http()or the entirestreamlink_cli.utils.http_servermodule.There are two choices that can be made for implementing the new CLI argument:
--player-external-http-continuous=boolrequiring a boolean value and affecting the logic of the main argument--player-external-http.The issue with this is that it's not consistent with the logic of the
--player-httpand--player-continuous-httparguments, which are individual arguments. It's also not consistent with the naming scheme (which I just realized), so it probably has to be changed to--player-external-continuous-http.--player-external-httpand--player-external-http-non-continuous, similar to--player-httpand--player-continuous-http. As you can see, the default logic of--player-external-httpalready is "continuous", so the second argument name has to be negated, which is not great.Thoughts?