-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
feat: prep commands rework #4023
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
Conversation
This is the only PR I have that I suspect may never be finished, I struggled a lot of the UX design of the commands. This is out of my expertise and realistically I only see this going past draft once an experienced UI developer offers some suggestions of what we can do. So for now, I am leaving it in draft until I get some suggestions on what we can do from UX standpoint. |
Note this UI is acceptable I guess, and there are some advantages particularly for 24H2 users where the encoder probing causes Sunshine to constantly throw 503 errors and require workaround scripts that essentially force the dummy plug to be activated prior to probing encoders. However not sure if it impacts the built in display swap, I recall a commit somewhere that allowed it to work before the probing but the issue is it wouldn't be able to restore the correct monitor either way because in order to do so you have to setup a restore point essentially. I am not sure when we will get a UI designer volunteer, but it may be months, or until AI advances to a point where it can fully automate UX design (more likely) |
|
Description
This pull request introduces a new event-based command system that reworks the legacy prep command system into a flexible, lifecycle-driven execution framework.
The original prep command system remains the default and recommended configuration for most users. This new model is fully opt-in and allows commands to run at precise points in the streaming lifecycle via event hooks, with fine-grained control via groups and command options.
Key Changes
Supported Events
Each command group is associated with one of the following lifecycle events:
PRE_STREAM_START
POST_STREAM_START
PRE_DISPLAY_CHECK
POST_DISPLAY_CHECK
CLIENT_CONNECT
ADDITIONAL_CLIENT
STREAM_RESUME
STREAM_PAUSE
CLIENT_DISCONNECT
PRE_STREAM_STOP
PRE_DISPLAY_CLEANUP
POST_DISPLAY_CLEANUP
POST_STREAM_STOP
ADDITIONAL_CLIENT_DISCONNECT
Default Behavior & Opt-In
Command System Structure
Command Groups
Group-Level Failure Policies
FAIL_FAST
: Abort remaining commands in this group on first failureCONTINUE_ON_FAILURE
: Continue execution despite individual command failuresFAIL_STAGE
: Finish the group but skip subsequent groups if any command failsCommand Options (Per Command)
elevated
: Run with elevated/system privilegesasync
: Execute the command asynchronouslyignore_errors
: Silently skip failure and continue executionThis structure supports robust, testable, and extensible automation across all major streaming lifecycle events.
Benefits
Screenshot
Issues Fixed or Closed
Type of Change
.github/...
)Checklist