Commit 479480b3 authored by Patrick Steinhardt's avatar Patrick Steinhardt
Browse files

kodi.packages.sendtokodi: init at 0.9.557

parent 585a8b12
Loading
Loading
Loading
Loading
+40 −0
Original line number Diff line number Diff line
{ lib, buildKodiAddon, fetchFromGitHub, addonUpdateScript, kodi, inputstreamhelper }:

buildKodiAddon rec {
  pname = "sendtokodi";
  namespace = "plugin.video.sendtokodi";
  version = "0.9.557";

  src = fetchFromGitHub {
    owner = "firsttris";
    repo = "plugin.video.sendtokodi";
    rev = "v${version}";
    hash = "sha256-Ga+9Q7x8+sEmQmteHbSyCahZ/T/l28BAEM84w7bf7z8=";
  };

  patches = [
    ./use-packaged-deps.patch
  ];

  propagatedBuildInputs = [
    inputstreamhelper
  ];

  postPatch = ''
    # Remove vendored youtube-dl and yt-dlp libraries.
    rm -r lib/
  '';

  passthru = {
    # Instead of the vendored libraries, we propagate youtube-dl and yt-dlp via
    # the Python path.
    pythonPath = with kodi.pythonPackages; makePythonPath [ youtube-dl yt-dlp ];
  };

  meta = with lib; {
    homepage = "https://github.com/firsttris/plugin.video.sendtokodi";
    description = "Plays various stream sites on Kodi using youtube-dl";
    license = licenses.mit;
    maintainers = teams.kodi.members ++ [ maintainers.pks ];
  };
}
+16 −0
Original line number Diff line number Diff line
diff --git a/service.py b/service.py
index 1d7b6e4..9782993 100644
--- a/service.py
+++ b/service.py
@@ -241,9 +241,9 @@ def playlistIndex(url, playlist):
 
 # Use the chosen resolver while forcing to use youtube_dl on legacy python 2 systems (dlp is python 3.6+)
 if xbmcplugin.getSetting(int(sys.argv[1]),"resolver") == "0" or sys.version_info[0] == 2:
-    from lib.youtube_dl import YoutubeDL
+    from youtube_dl import YoutubeDL
 else:
-    from lib.yt_dlp import YoutubeDL
+    from yt_dlp import YoutubeDL
     
 # patch broken strptime (see above)
 patch_strptime()
+2 −0
Original line number Diff line number Diff line
@@ -164,6 +164,8 @@ let self = rec {

  routing = callPackage ../applications/video/kodi/addons/routing { };

  sendtokodi = callPackage ../applications/video/kodi/addons/sendtokodi { };

  signals = callPackage ../applications/video/kodi/addons/signals { };

  simplejson = callPackage ../applications/video/kodi/addons/simplejson { };