diff options
author | Aaron Andersen <aaron@fosslib.net> | 2023-10-23 18:35:32 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-23 18:35:32 -0400 |
commit | 3ee75d0df5bfb9ee3c876ab67ed18b532473e6cb (patch) | |
tree | 8d18873b50d8578e2ec9efeb50c0b1994ced480a /pkgs/applications/video | |
parent | 0a0f3f5de20bb97fb0ba88774dc5a15f711d3cf0 (diff) | |
parent | 479480b3a0a062fd10092354622751cdb6c2ce2f (diff) |
Merge pull request #262704 from pks-t/pks-kodi-plugin-video-sendtokodi-0.9.557
kodi.packages.sendtokodi: init at 0.9.557
Diffstat (limited to 'pkgs/applications/video')
-rw-r--r-- | pkgs/applications/video/kodi/addons/sendtokodi/default.nix | 40 | ||||
-rw-r--r-- | pkgs/applications/video/kodi/addons/sendtokodi/use-packaged-deps.patch | 16 |
2 files changed, 56 insertions, 0 deletions
diff --git a/pkgs/applications/video/kodi/addons/sendtokodi/default.nix b/pkgs/applications/video/kodi/addons/sendtokodi/default.nix new file mode 100644 index 0000000000000..f6946842ded41 --- /dev/null +++ b/pkgs/applications/video/kodi/addons/sendtokodi/default.nix @@ -0,0 +1,40 @@ +{ 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 ]; + }; +} diff --git a/pkgs/applications/video/kodi/addons/sendtokodi/use-packaged-deps.patch b/pkgs/applications/video/kodi/addons/sendtokodi/use-packaged-deps.patch new file mode 100644 index 0000000000000..abfea58a7ceb8 --- /dev/null +++ b/pkgs/applications/video/kodi/addons/sendtokodi/use-packaged-deps.patch @@ -0,0 +1,16 @@ +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() |