refactor(remote): encode the session create body in run_plan.session_request beside served_plan

This commit is contained in:
imSp4rky
2026-12-02 21:03:18 -07:00
parent 340a4b368f
commit f8a248a29e
7 changed files with 163 additions and 146 deletions
+3 -3
View File
@@ -17,8 +17,8 @@ from unshackle.core.dl_options import (
DL_OPTIONS,
FORWARDED_DL_PARAMS,
cast_dl_params,
remote_dl_params,
)
from unshackle.core.run_plan import session_request
from unshackle.core.tracks import Audio, Subtitle, Video
CLI_ONLY = {DL_OPTION_ALIASES.get(name, name) for name, option in DL_OPTIONS.items() if option is None}
@@ -127,11 +127,11 @@ def test_every_dl_option_reaches_dl_result():
],
)
def test_the_client_sends_what_it_has_a_value_for(parent_params, sent):
assert remote_dl_params(parent_params) == sent
assert session_request(parent_params, {})["dl_params"] == sent
def test_no_forwarded_option_has_an_alias():
"""remote_dl_params reads the API name from the click context, so an aliased option cannot be forwarded."""
"""session_request reads the API name from the click context, so an aliased option cannot be forwarded."""
assert not {name for name, _ in FORWARDED_DL_PARAMS} & DL_OPTION_ALIASES.keys()