Kodi Community Forum

Full Version: combining plugin and service addons
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi!

First of all I'm sorry for my English mistakes.

I'm new in Kodi and would like to create a video plugin with the option of the time based scheduled database information update. I have a several question:
  1. can I define my own sqlite3 db file to store the scraped information in it (movie name, link, base64 thumbnail );
  2. can I define the service addon inside of the video plugin;
  3. if I can't do the 2-nd point, how I can tell the service addon to update my plugin's db information;
  4. my scarper based on requests and selenium webdriver libs, can Kodi support the Chrome webdriver without chrome by itself?
This is for beginning, after this answers I'll ask some new to understand the right way of the implementation of my goal.

Thanks in advance.
ad 1. yes, you can store it in userdata/addon_data/<addon_name> by accessing special path
ad 2. no, service will have to be different plugin, can make service and plugin in as one big chunk, but it would be easier for you to make them separate you can always depend on on another if you want to make the installation easier
ad 3. you can make it by time base (schedule task) by simply calling it out executebuiltin or runscript
ad 4. I never used one but looks like there is something out in the wild: https://github.com/andrewleech/script.module.webdriver
(2019-08-09, 14:39)bigretromike Wrote: [ -> ]ad 1. yes, you can store it in userdata/addon_data/<addon_name> by accessing special path
ad 2. no, service will have to be different plugin, can make service and plugin in as one big chunk, but it would be easier for you to make them separate you can always depend on on another if you want to make the installation easier
ad 3. you can make it by time base (schedule task) by simply calling it out executebuiltin or runscript
ad 4. I never used one but looks like there is something out in the wild: https://github.com/andrewleech/script.module.webdriver
Dear bigretromike,

Thank you for the complete answers. To understand the 3-rd point - there is no any restriction to make the "INPUT" sql request to the another plugin db file? About 4-th point I saw it before but there is no any information regarding the pros and cons even basic tutorial. But I'll give the info of my progress of using this module.
(2019-08-08, 11:47)houbig Wrote: [ -> ]my scarper based on requests and selenium webdriver libs, can Kodi support the Chrome webdriver without chrome by itself?

Not possible, and it is not Kodi-specific. Selenium requires a browser engine (headless or regular) by design.
(2019-08-09, 15:05)houbig Wrote: [ -> ]
(2019-08-09, 14:39)bigretromike Wrote: [ -> ]ad 1. yes, you can store it in userdata/addon_data/<addon_name> by accessing special path
ad 2. no, service will have to be different plugin, can make service and plugin in as one big chunk, but it would be easier for you to make them separate you can always depend on on another if you want to make the installation easier
ad 3. you can make it by time base (schedule task) by simply calling it out executebuiltin or runscript
ad 4. I never used one but looks like there is something out in the wild: https://github.com/andrewleech/script.module.webdriver
Dear bigretromike,

Thank you for the complete answers. To understand the 3-rd point - there is no any restriction to make the "INPUT" sql request to the another plugin db file? About 4-th point I saw it before but there is no any information regarding the pros and cons even basic tutorial. But I'll give the info of my progress of using this module. 

No there is no sandboxing, so you can access userdata from one addon from other addon.