mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 00:43:20 +00:00
Merge pull request #329468 from NixOS/backport-327480-to-release-24.05
[Backport release-24.05] kodiPackages.sendtokodi: remove dependency on youtube_dl
This commit is contained in:
commit
2885f7b243
@ -13,7 +13,10 @@ buildKodiAddon rec {
|
||||
};
|
||||
|
||||
patches = [
|
||||
./use-packaged-deps.patch
|
||||
# Unconditionally depend on packaged yt-dlp. This removes the ability to
|
||||
# use youtube_dl, which is unmaintained and considered vulnerable (see
|
||||
# CVE-2024-38519).
|
||||
./use-packaged-yt-dlp.patch
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
@ -26,14 +29,14 @@ buildKodiAddon rec {
|
||||
'';
|
||||
|
||||
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 ];
|
||||
# Instead of the vendored libraries, we propagate yt-dlp via the Python
|
||||
# path.
|
||||
pythonPath = with kodi.pythonPackages; makePythonPath [ yt-dlp ];
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/firsttris/plugin.video.sendtokodi";
|
||||
description = "Plays various stream sites on Kodi using youtube-dl";
|
||||
description = "Plays various stream sites on Kodi using yt-dlp";
|
||||
license = licenses.mit;
|
||||
maintainers = teams.kodi.members ++ [ maintainers.pks ];
|
||||
};
|
||||
|
@ -1,16 +1,18 @@
|
||||
diff --git a/service.py b/service.py
|
||||
index 1d7b6e4..9782993 100644
|
||||
index 024ad9a..6ef71dd 100644
|
||||
--- a/service.py
|
||||
+++ b/service.py
|
||||
@@ -241,9 +241,9 @@ def playlistIndex(url, playlist):
|
||||
@@ -243,11 +243,8 @@ 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:
|
||||
-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:
|
||||
-else:
|
||||
- from lib.yt_dlp import YoutubeDL
|
||||
+ from yt_dlp import YoutubeDL
|
||||
|
||||
-
|
||||
+from yt_dlp import YoutubeDL
|
||||
+
|
||||
# patch broken strptime (see above)
|
||||
patch_strptime()
|
||||
|
Loading…
Reference in New Issue
Block a user