-
Notifications
You must be signed in to change notification settings - Fork 36
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
feat: user-configurable key binds #178
Comments
You'll need to add the section: https://github.com/ftc2/plex-for-kodi/blob/3690719815dd51865d423a9b06aed950a4e5da45/lib/windows/settings.py#L943
The third value when defining a setting is always the default (see other settings); you've set it to None.
We have two settings areas, the one inside PM4K and more "advanced" ones called "addon settings". Those are accessible from outside PM4K (long press on the icon, settings). This area of the code just makes those more accessible inside the codebase and translates them from |
Ah I get your confusion now with the default value. You actually set it when calling It's not ideal, I know, but right now the GUI part of settings doesn't generally expose its definitions and getSetting is agnostic of those, and just pulls the value from Kodi and returns the default if it's not found. |
This should probably be changed to have a single source of truth for the default values and simplify the usage of settings. |
hi @pannal,
i was talking to you on the forum about keybind stuff recently. i went with a decorator-based approach that can be used like this :)
but i have some questions before i continue and submit my PR.
how do i make a new section in the Settings window?
since i plan to expose a decent number of keybinds, i want to make a new section instead of cluttering the User Interface section.
i tried this:
https://github.com/ftc2/plex-for-kodi/blob/3690719815dd51865d423a9b06aed950a4e5da45/lib/windows/settings.py#L675-L680
but the new section did not appear.
i looked at script-plex-settings.xml.tpl, and my eyeballs exploded. i am not familiar with xml templating lol. do i need to edit this? i will need another coffee
how do i set default values for settings?
some things like toggling subtitles already have legacy, hardcoded keybinds in pm4k, so i want to set those defaults when i convert them to user-configurable keybinds.
do i need to expand
settings.KeySetting
?plex-for-kodi/lib/windows/settings.py
Line 398 in 97e7e61
i saw
util.AddonSettings._proxiedSettings
, but i'm guessing this is not what i want? what is this thing, actually?plex-for-kodi/lib/util.py
Line 117 in 97e7e61
or is it somewhere else?
thanks
The text was updated successfully, but these errors were encountered: