Pre-existing functionality to send URLs to, and have appropriate plugin take over.
#1
I''ve been maintaining an (scrape-ish) addon for a while now. However the sources have changed from their own home grown CDN to a more heterogeneous list of videos, consisting of their own CDN, youtube, and Vimeo.

Basically I'm at the point where I get the following per video item:

1. Title
2. embed code (<script src= ...>)
3. Direct URL (e.g., youtube.com?v=xxxxx, vimeo.com?someparam=xxxxx, some.cdn.com?some_param=xxxxxx)

I'm now if-else-ing on the possibilities and for example for the youtube case, extracting the videoID and forward it to the existing youtube plugin (through plugin://plugin.video.youtube/...). I was wondering if there is pre-existing functionality in Kodi and/or its python modules, to just send URLs like the youtube one and vimeo ones to. Or should I continue like i'm doing now, and try to extract some videoID for well known video sites and send it to to the "correct" plugin myself? If I'm going this route, should I add youtube and vimeo plugins as required in my addon.xml?

Any pointers on how to solve or improve this are welcome.

Thanks,
Reply
#2
Sounds like you are already doing it the best way.

I believe you can add the addons as optional dependencies in addon.xml
Reply

Logout Mark Read Team Forum Stats Members Help
Pre-existing functionality to send URLs to, and have appropriate plugin take over.0