Skip to content

Conversation

@parkour86
Copy link
Contributor

Checks

@Core447
Copy link
Member

Core447 commented Jul 6, 2025

Amazing work!

Any particular reason you're writing the changes manually to ~/.config/streamcontroller/github_plugin_settings.json" instead of set_settings and get_settings from the PluginBase?

@parkour86
Copy link
Contributor Author

Amazing work!

Any particular reason you're writing the changes manually to ~/.config/streamcontroller/github_plugin_settings.json" instead of set_settings and get_settings from the PluginBase?

The set_settings and get_settings functions currently update settings on a per-button basis. Since users will have 6–7 buttons, I’d like to avoid requiring them to enter their API credentials multiple times.

Is there a better way to share or synchronize the settings across multiple buttons?

@Core447
Copy link
Member

Core447 commented Jul 6, 2025

Is there a better way to share or synchronize the settings across multiple buttons?

You can use the methods of the plugin manager. For an example you can checkout: https://github.com/StreamController/OBSPlugin/blob/bd2cfc343ed55f53612d9ccc83f0a8fbe91e779a/OBSActionBase.py#L58-L61

@parkour86
Copy link
Contributor Author

Thanks, i'll try this method and push the change since my method is insecure.

@Core447
Copy link
Member

Core447 commented Jul 11, 2025

Thanks, i'll try this method and push the change since my method is insecure.

👍 Just ping me when you're ready.

@parkour86
Copy link
Contributor Author

@Core447 , I updated the code to use plugin-level settings. When I have two buttons, updating the settings on one does update the other — but it doesn’t trigger an API refresh on the second button. I have to navigate away and back for it to reload.
Is there a way to programmatically force a page reload on the Stream Deck or force the other buttons to re-run their on_ready() functions?

@Core447
Copy link
Member

Core447 commented Jul 15, 2025

Is there a way to programmatically force a page reload

There is, but it's not really nice to trigger a reload.

I would suggest to just check the settings periodically through on_tick. Alternatively, you could keep a list of all actions of your plugin in the plugin_base object and call a refresh method on all of them.

@parkour86
Copy link
Contributor Author

@Core447, Thank you — on_tick was exactly what I needed. I've pushed the changes and updated Plugins.json. It's working great on my end, but feel free to review and let me know if anything needs adjustment.

Side note: Would it be possible to add on_tick to the Plugin Development guide? Could be helpful for others getting started.

@Core447
Copy link
Member

Core447 commented Jul 19, 2025

Side note: Would it be possible to add on_tick to the Plugin Development guide? Could be helpful for others getting started.

It's under ActionBase: https://streamcontroller.core447.com/streamcontroller/docs/latest/plugin_dev/bases/ActionBase_py/?h=on_tick#on_tick

But yeah, it's easy to miss

@Core447 Core447 merged commit 2b104c4 into StreamController:main Jul 19, 2025
1 check passed
@Core447
Copy link
Member

Core447 commented Jul 19, 2025

What's your name on discord so that I can mention you in the release announcement?

@parkour86
Copy link
Contributor Author

parkour86 commented Jul 19, 2025

@Core447, My discord name is: Code Ninja

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants