firsttris / plugin.video.sendtokodi

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

Consider exposing libs: youtube-dl & yt-dlp #47

Closed fbacher closed 2 years ago

fbacher commented 2 years ago

My addon has been accessing youtube-dl via script.module.youtube.dl, but with the current problems with youtube-dl I gave yt-dlp a try by modifying sendtokodi so that the lib is exported. This simple solution worked for my situation.

I have opened an issue with script.module.youtube.dl to add yt-dlp support similar to what you have done, but I'm not sure how active that project is.

The only complication that I can see for sendtokodi is that it is probably cleaner to create a separate addon to contain and export the youtube.dl and yt-dlp libs rather than doing it here.

firsttris commented 2 years ago

what would we need to change in order to achieve this? (exporting the libs)

can you make an pull-request and we can discuss there?

nullket commented 2 years ago

The only complication that I can see for sendtokodi is that it is probably cleaner to create a separate addon to contain and export the youtube.dl and yt-dlp libs rather than doing it here.

Yes totally agree. But this would imply that:

  1. somebody would actually need to create a script.module.youtube.dlp addon (including an extra git repo, building, publishing etc.)
  2. the library is regularly updated and pushed to the official kodi repo

While one could argue that for point 2. it would be also possible to provide this extra addon via the kodi sendtokodi repo, I do not see real benefits from this. The kodi sendtokodi repo would then contain two plugins where one is just used by the other. All the versioning etc. would be a bit more complicated for just a cleaner git repo and even other addons like yours would need the sendtokodi kodi repo as a dependency as well in order to install script.module.youtube.dlp from there (even if not using the sendtokodi addon itself). IMHO a script.module.youtube.dlp addon would make only sense if it was in the offical kodi repos. In general exporting the libs is a very good idea and I would like to see it. Independently of sendtokodi this could be seen as first step figuring out what it takes to publish to the offical kodi repo and if automatic updates are actually possible (aka allowed by the kodi stuff).

I have opened an issue with script.module.youtube.dl to add yt-dlp support similar to what you have done, but I'm not sure how active that project is.

According to their README the project has moved to an older fork!? Seems kind of dead?

nullket commented 2 years ago

@fbacher you have closed the issue: My previous comment was not intended to discourage exposing the libs. I was just saying that it would make most sense if it was in the official kodi repo. Now somebody must "just" do it and ensure updates. If nobody does it, I can have a look into it next year.

firsttris commented 2 years ago

@nullket we just exposed the libs from this addon: https://github.com/firsttris/plugin.video.sendtokodi/commit/b1b683da485c3c7b49cb0886982fd6dffe6267ac

thats why he closed.

fbacher commented 2 years ago

I think I understand better what is going on here. For some reason I thought that sendtokodi was part of the official repo. I should have checked first. You are right, that yt-dlp should be part of the existing official youtube.dl addon. I can look into that since I have a vested interest.

At the moment I am trying to figure out why, on one of my Linux machines, Kodi is locking up importing keymap. Other machine is not. I see the bug related to this and trying to pursue. Sigh. (Worked on 19.0, blew up on Kodi 19.3). But, that is another story. It is just consuming my attention at the moment.