Skip to content

Conversation

@mediaminister
Copy link
Collaborator

@mediaminister mediaminister commented Nov 10, 2020

This fixes #388

I guess xbmcaddon.getSettingNumber isn't functional because you can only define an integer type in the Kodi addon settings xml and in addition it is wrongly named as type="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 a SettingType::Number, so it differs from TSetting::Type() and returns false
https://github.com/xbmc/xbmc/blob/c4de26b28fb13ce65eb1caac4236d83bd410d112/xbmc/addons/Addon.cpp#L206

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@mediaminister mediaminister added this to the v0.5.2 milestone Nov 10, 2020
Copy link
Collaborator

@horstle horstle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I didn't test it, but I can't see how it could break anything and the tests seem to be successful.

@mediaminister mediaminister merged commit 8de8851 into emilsvennesson:master Nov 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Invalid setting type

2 participants