Fix invalid setting type #410
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes #388
I guess
xbmcaddon.getSettingNumberisn't functional because you can only define an integer type in the Kodi addon settings xml and in addition it is wrongly named astype="number".Maybe this can be fixed upstream if Team Kodi still accepts changes to the deprecated old settings format:
https://kodi.wiki/view/Add-on_settings#type.3D.22number.22
Relevant source code
https://github.com/xbmc/xbmc/blob/5230b683323ca58c62459a371c1306a6cb4d4644/xbmc/addons/settings/AddonSettings.cpp#L832-L844
setting->GetType()can never be aSettingType::Number, so it differs fromTSetting::Type()and returns falsehttps://github.com/xbmc/xbmc/blob/c4de26b28fb13ce65eb1caac4236d83bd410d112/xbmc/addons/Addon.cpp#L206