Kodi Community Forum

Full Version: Confirmation on key value "level" in Setting.Details.SettingBase
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have read the schema for the return value of method Settings.GetSettings to contain among many other things, the "level" value
But in retrieving the array of "Setting.Details.Setting" values I have found that the level value as defined in "Setting.Details.SettingBase" to not be an integer, but type string (ie basic, standard, advanced, expert)
As in this "Setting.Details.Setting" value returned for "musiclibrary.downloadinfo"

{
"settings": [
{
"control": {
"delayed": false,
"format": "boolean",
"type": "toggle"
},
"default": false,
"enabled": true,
"help": "Automatically fetch album and artist information via scrapers during scan.",
"id": "musiclibrary.downloadinfo",
"label": "Download additional information during updates",
"level": "basic",
"parent": "",
"type": "boolean",
"value": true
}
]
}

Notice the level value is not integer as "Setting.Details.SettingBase" defines it to be:

"Setting.Details.SettingBase": {
"additionalProperties": false,
"extends": "Setting.Details.Base",
"id": "Setting.Details.SettingBase",
"properties": {
"control": {
"$ref": "Setting.Details.Control"
},
"enabled": {
"required": true,
"type": "boolean"
},
"level": {
"required": true,
"type": "integer"
},
"parent": {
"default": "",
"type": "string"
},
"type": {
"$ref": "Setting.Type",
"required": true
}
}
}


What might i be missing??
Looks like a mistake in the API definition.
yes, it looks like it should be "type" : "$ref":Setting.Level
Yeah it should already be fixed in master and in Isengard RC2.