Posts: 247
Joined: Jul 2011
Reputation:
6
devkid
Senior Member
Posts: 247
Ok, thank you. I will take a look. But I am not sure if this method will be working as the delay value is not in regular settings but in advanced settings.
Posts: 4,588
Joined: Jan 2011
Reputation:
157
DaVu
Team-Kodi Member
Posts: 4,588
As adressed multiple times now,
The setting is not "placed" in advanced settings. You are able to modify the core setting from this section. That doesn't mean the value is set at this section. Modifying the advancedsettings.xml from the JSON RPC is not supported and won't make any sense as that won't have a "runtime-effect".
As said earlier (in other threads) as well, Kodi also reads that value from the "guisettings.xml" file during startup. Modifying that file is also not supported and won't change anything during Kodi runtime as that file is only read at the time Kodi starts.
As you have pointed out yourself, the only thing which can be done via JSON is "audiodelayplus" and/or "audiodelayminus". If that won't match your need, we can't do anything for you unless someone creates a PR which gives the option to set a specific value for the audiodelay.
Posts: 247
Joined: Jul 2011
Reputation:
6
devkid
Senior Member
Posts: 247
I am not an expert but I think there are two problems:
* The delay value is an advanced setting and not a regular setting so the "Settings.SetSettingValue" call won't work
* Even if you manage to change it: the delay value from the advanced settings is only read when the player is started/created so you would also make sure to update the value in the current player if you manage to change the advanced setting value at runtime
Posts: 59
Joined: Nov 2020
Reputation:
3
I meant that in the next version of kodi, the developers will add the option to change the delay in the main settings with id, so that it can also be changed via an API just like the UI controls.
Posts: 4,588
Joined: Jan 2011
Reputation:
157
DaVu
Team-Kodi Member
Posts: 4,588
All those explanations have already be made at the German Kodinerds Forum where he also asked.
And yes, I know if that value would have a setting ID, it could easily be changed. But as that's not the case currently, we can't do much at this point.
Creating scripts which would change that value wouldn't be allowed at our repos. Changing this value at its current state and implementation wouldn't help him as well as the guisettings are only read at Kodi startup and only saved if Kodi exits properly. Take a look at yourself. Change the volume and have a look at the guisettings while Kodi is still running. Nothing is changed until you close Kodi.
So...only giving this setting an ID won't change its behaviour during runtime. There's a bit more which needs to be done.
JSON provides the option audiodelayplus or audiodelayminus
Currently you can't set a specific value and all suggested workarounds won't change the delay during run-time.
Posts: 59
Joined: Nov 2020
Reputation:
3
correct. And the same thing about the example I gave with port, if you change the value in the settings - it changes in guisettings while kodi is running.
So I did not understand what the problem is, just add id in the next version of kodi? How is it different from port?