Quantcast
Channel: Kodi Community Forum - Subtitle Add-ons
Viewing all articles
Browse latest Browse all 368

v18 - Can i add multiple subtitles providers within same addon module ?

$
0
0
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:

<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

Viewing all articles
Browse latest Browse all 368

Trending Articles