Tolriq / repository.yatse.kodi

Yatse repository for Kodi helper Add-ons.
https://yatse.tv/wiki/yatse-kodi-addon
50 stars 16 forks source link

Support Nebula video #33

Open jbolla opened 2 years ago

jbolla commented 2 years ago

The yt_dlp library supports Nebula but it fails when executed through the share function of yatse since it doesn't have credentials. I put together a quick proof of concept by adding this snippet to handle_unresolved_url in share.py after the youtube block.

if 'nebula.app' in url:
    result = resolve_with_youtube_dl(url, {'format': 'best', 'no_color': 'true', 'ignoreerrors': 'true', 'username': '<my_username>', 'password': '<my_password>'}, action)
    if result:
        return

If I knew more about your codebase and kodi addons I'd open a PR. I'd obviously want to load the username and password from config instead of hardcoding it. There may be other entrypoints aside from this one where you need to add it.

Tolriq commented 2 years ago

I don't know much about Kodi addons either :p I have no time to implement that soon sorry, but to be added it must be configurable via the addon setting page and support adding additional cases later.

maltehol commented 2 weeks ago

If you use the slyguy Nebula addon, you can redirect the request to this Addon:

def resolve_with_nebula(url, action): 
    nebula_addon = xbmcaddon.Addon(id="slyguy.nebula")
    if nebula_addon:
        utils.play_url('plugin://slyguy.nebula/?play=%s' % data, action)
        return true

and

    if 'nebula.app' in url:
            result = resolve_width_nebula(url, action)
            if result:
                return

Maybe one could add some settings to add any redirection for a plugin?

url addon playUrl
nebula.app slyguy.nebula ?play=
myStreamService plugin.video.myStreamingService ?url=

Not done any kodi addon development either, but I would look into it if such feature is wanted.