Quick question in regards to submitting a addon?
#1
I actually have a addon that I would like to submit to the official repo in the coming weeks, I am still adding features so I want it to be more complete before attempting to release it.

The reason I am making this post within the code I manually update my addon's setting.xml to keep the user from having to close Kodi and restart it.
I know you guys don't really like addons changing settings in this manner so I wanted to know it this is allowed since it is only changing its own settings doc?

Also so as of now it is a combo addon, it is showing in program addons as well as video addons... is there a way to remove it from program addons but still keep the functionality?

As it will provide context menu, which gets a list of videos, but there is still a service that is set to run only once at startup.
Shield TV | Windows 10 | Mariadb | Mii Box
Evolve Ecosystem Repo | TV Melodies | Madnox Holiday Mod
Reply
#2
(2018-01-05, 13:33)smitchell6879 Wrote: The reason I am making this post within the code I manually update my addon's setting.xml to keep the user from having to close Kodi and restart it.
 
out of interest, could you please elaborate?
i never understood why some addons do that or how it is related to restarting kodi?
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#3
Basically I have a setting that allows you to enable disable the context menu... The context menu visibility is set with a property.. the property is set with the startup service that checks setting and the sets the property.

If your already in Kodi and you disable the context menu then you have to restart Kodi before the setting is updated..

So since the setting.xml is my add-on setting I parse the setting and change the setting manually before Kodi would normally update then I call the service part of my add-on to change the property. At time the service stops.

I could do a waitforabort loop but Kodi doesn't seem to update the setting.xml for this particular bool setting until Kodi is closed.. plus there is no reason to add the extra memory usage just to check a setting that may get changed once or twice.
Shield TV | Windows 10 | Mariadb | Mii Box
Evolve Ecosystem Repo | TV Melodies | Madnox Holiday Mod
Reply
#4
I have one last question in regards to writing data to files. So with this addon I am going to try to build a separate database sepreate from the core videodb of course. With this I still plan to use a custom .nfo for these one off videos. 

so in regards to the official repo

1. Can I still add my differently named sqlite3 database in /userdata/Database  to keep everything consistent with the kodi  profile folder structure.
2. I may try to add .nfo support for these videos since they will not be apart of the normal database they will not get exported with the normal database, so can I add my own export in my addon settings for these unique .nfo so that they can be easier edited by the user to add more info then I will be suppling. It should be any different then using a scraper other then the its not linked.

hopefully this makes sense. I am just trying to make sure it will be accepted into the repo before I go to far astray.

thanks for your time.
Shield TV | Windows 10 | Mariadb | Mii Box
Evolve Ecosystem Repo | TV Melodies | Madnox Holiday Mod
Reply
#5
(2018-01-05, 13:33)smitchell6879 Wrote: Also so as of now it is a combo addon, it is showing in program addons as well as video addons... is there a way to remove it from program addons but still keep the functionality?
nope, as far as i know you cannot hide it.
 
(2018-01-05, 22:52)smitchell6879 Wrote: I could do a waitforabort loop but Kodi doesn't seem to update the setting.xml for this particular bool setting until Kodi is closed
if a user changes a setting through the addon settings dialog, it's saved to settings.xml once the dialog is closed.
however, if the addon is changing a setting, using setSetting(), it won't be saved to file until kodi closes.

in case you need to use the latter, the proper way would be to keep the service addon running.
you can use the Monitor class and listen for onSetingsChanged() notifications to enable/disable your contaxt menu.
 
(2018-01-08, 01:22)smitchell6879 Wrote: 1. Can I still add my differently named sqlite3 database in /userdata/Database  to keep everything consistent with the kodi  profile folder structure.
nah, addons really have to save their data to their own addon_data subfolder.
if you need profiles support, you can create a subfolder for each user in there.
 
(2018-01-08, 01:22)smitchell6879 Wrote: 2. I may try to add .nfo support for these videos since they will not be apart of the normal database they will not get exported with the normal database, so can I add my own export in my addon settings for these unique .nfo so that they can be easier edited by the user to add more info then I will be suppling. It should be any different then using a scraper other then the its not linked.
same as above, as long as those .nfo files are saved into your addon_data folder, there shouldn't be any problem with having an export function.
if you want to save the .nfo file alongside the actual video, make that an optional setting (not enabled by default).
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#6
Perfect thanks, now once I figure out the correct way to implement these I will release to for testing.
Shield TV | Windows 10 | Mariadb | Mii Box
Evolve Ecosystem Repo | TV Melodies | Madnox Holiday Mod
Reply

Logout Mark Read Team Forum Stats Members Help
Quick question in regards to submitting a addon?0