firsttris / plugin.video.sendtokodi

:tv: plays various stream sites on kodi using youtube-dl
MIT License
125 stars 28 forks source link

On Linux, use the system yt-dlp if available instead of embedded #103

Open ilikenwf opened 7 months ago

ilikenwf commented 7 months ago

I use Arch and use the -git builds of yt-dlp. As such, it's more up to date with fixes for cloudflare streams and the like. I suggest that you determine if yt-dlp exists within the system python, and if it does, use that instead of the one embedded with the plugin.

ilikenwf commented 7 months ago

...that or pull in the current yt-dlp master and test to see if you can get cloudflarestream URIs to playback?

It works in yt-dlp itself but not sendtokodi.

https://watch.cloudflarestream.com/2463f6d3e06fa29710a337f5f5389fd8/iframe/?autoplay\=true\&letterboxColor\=transparent

https://customer-aw5py76sw8wyqzmh.cloudflarestream.com/2463f6d3e06fa29710a337f5f5389fd8/iframe

nullket commented 7 months ago

The plugin is updated once day with the upstream yt_dlp master branch. If there were changes a new plugin version is released and should be automatically updated in your Kodi instance. So we might be even faster than arch ;)?

https://github.com/firsttris/plugin.video.sendtokodi/commits?author=github-actions%5Bbot%5D

I have no experience in that but I assume that it is not possible to import a system wide installed python module in an embedded python environment (I simply don’t know!)?

anohren commented 1 month ago

@nullket I have a working prototype of using external yt-dlp, which enables use of yt-dlp even on Kodi versions constrained to Python 2. I wanted to ask whether you think it's a good idea to expose a setting for users to specify the path manually?

This is not done by importing Python modules (which wouldn't work on Python 2 anyway), but by parsing command output from a working executable. Nevertheless, it was implemented in about three lines of code, so it's very easy on the eyes.

Just wanted a second opinion before adding the boring bits (e.g. addon settings).