script.module.youtube.dl icon indicating copy to clipboard operation
script.module.youtube.dl copied to clipboard

Use youtube-dl script in an URI

Open pvdl opened this issue 10 years ago • 4 comments

Is this possible in Kodi?

plugin://script.module.youtube.dl?url="http://youtube.com/?v=whatever"

If not? It would be awesome to have this feature!

E.g in a m3u playlist.

#EXTM3U
#EXTINF:-1 group-title="News",News stream with a 'token'
plugin://script.module.youtube.dl?url="http://news.com/livestream"

pvdl avatar Mar 19 '15 13:03 pvdl

Does anyone know if this is possible yet? I was wanting to add a Context Menu to an Addon who's action was RunPlugin('plugin://script.module.youtube.dl/?mode=download&url=http://www.urltoresolve/video/12345') If not using this script is there another Module for Kodi that might make similar functionality possible?

moedje avatar Jun 29 '16 13:06 moedje

This addon is not a plugin, so using a plugin URL isn't really the way to go. Something using RunScript() would make more sense, but isn't currently in the addon.

Fortunately, you can accomplish what you mentioned now by importing the module in your context menu code and using it that way.

import YDStreamExtractor

url = 'http://www.urltoresolve/video/12345'
info = YDStreamExtractor.getVideoInfo(url)
YDStreamExtractor.handleDownload(info, bg=True)

ruuk avatar Jun 29 '16 23:06 ruuk

Based on this wiki http://kodi.wiki/view/Add-on:YouTube I made a file demo.strm in my ~/Videos folder. The file contains:

plugin://plugin.video.youtube/?path=~/.kodi/addons&action=play_video&videoid=xxxyyyzzz

where path= your path to the addon folder and videoid= Youtube video id.

This method works but this is for the plugin: plugin.video.youtube. Is there a possibility to achieve this method also with: script.module.youtube.dl?

pvdl avatar Nov 23 '16 20:11 pvdl

Hi pvdl, i think i created what you requested: https://github.com/firsttris/plugin.video.sendtokodi

firsttris avatar Mar 11 '17 21:03 firsttris