v18 Can i add multiple subtitles providers within same addon module ?
#1
Hello,

I'm developing my own subtitle service addon. My goal is to enable it for various providers (opensubtitles, subscene etc.)
I've already developed my script for 1 provider, how can i add different provider within the same package ? So when I'm in video subtitle OSD, I can select which of my providers to use.

My addon structure looks like this:

service.subtitles.cyril
  addon.xml
  provider1.py
  resources folder (contains my lib scripts)

I want to add provider2.py, provider3.py etc.
But in the addon.xml, I only know how to add 1 subtitle service:

xml:
<addon id="service.subtitles.cyril"
       name="Cyril"
       version="1.1.0"
       provider-name="cyriltra">
  <extension point="xbmc.subtitle.module" library="provider1.py" />
</addon>

I don't want to have multiple addon module because it will duplicate my code and will be hard to maintain (ex: service.subtitles.cyril, service.subtitles.cyril2, service.subtitles.cyril3 etc.)

Thank you
Reply
#2
Here is the solution for those interested:

i've created another addon extending script.module.python.
This addon contains a folder lib with all my dependency scripts.

Then I import this addon in each of my subtitles addons
Reply
#3
Hi there!
Please let us know if there will be a test version!

I am looking forward testing it!
Reply
#4
(2019-05-03, 13:26)pcextreme Wrote: Hi there!
Please let us know if there will be a test version!

I am looking forward testing it!

Hi, 
my scripts actually target Chinese subtitles and is a fork from original Taxigps's scripts (still regularly updated): https://github.com/taxigps/xbmc-addons-chinese
Reply
#5
Thanks for the info.
Reply

Logout Mark Read Team Forum Stats Members Help
Can i add multiple subtitles providers within same addon module ?0