mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-11 04:02:55 +03:00
Merge pull request #177304 from collares/youtubedl-throttling2
This commit is contained in:
commit
c59d9f20d9
@ -25,8 +25,8 @@ buildPythonPackage rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
# Fixes throttling on youtube.com. Without the patch downloads are capped at
|
# Fixes throttling on youtube.com by decoding a "n-parameter". Without the patch
|
||||||
# about 80KiB/s. See, e.g.,
|
# downloads are capped at about 80KiB/s. See, e.g.,
|
||||||
#
|
#
|
||||||
# https://github.com/ytdl-org/youtube-dl/issues/29326
|
# https://github.com/ytdl-org/youtube-dl/issues/29326
|
||||||
#
|
#
|
||||||
@ -37,6 +37,20 @@ buildPythonPackage rec {
|
|||||||
url = "https://github.com/ytdl-org/youtube-dl/compare/57044eacebc6f2f3cd83c345e1b6e659a22e4773...1e677567cd083d43f55daef0cc74e5fa24575ae3.diff";
|
url = "https://github.com/ytdl-org/youtube-dl/compare/57044eacebc6f2f3cd83c345e1b6e659a22e4773...1e677567cd083d43f55daef0cc74e5fa24575ae3.diff";
|
||||||
sha256 = "11s0j3w60r75xx20p0x2j3yc4d3yvz99r0572si8b5qd93lqs4pr";
|
sha256 = "11s0j3w60r75xx20p0x2j3yc4d3yvz99r0572si8b5qd93lqs4pr";
|
||||||
})
|
})
|
||||||
|
# The above patch may fail to decode the n-parameter (if, say, YouTube is updated). Failure to decode
|
||||||
|
# it blocks the download instead of falling back to the throttled version. The patch below implements
|
||||||
|
# better fallback behaviour.
|
||||||
|
(fetchpatch {
|
||||||
|
name = "avoid-crashing-if-nsig-decode-fails.patch";
|
||||||
|
url = "https://github.com/ytdl-org/youtube-dl/commit/41f0043983c831b7c0c3614340d2f66ec153087b.diff";
|
||||||
|
sha256 = "sha256-a72gWhBXCLjuBBD36PpZ5F/AHBdiBv4W8Wf9g4P/aBY=";
|
||||||
|
})
|
||||||
|
# YouTube changed the n-parameter format in April 2022, so decoder updates are required.
|
||||||
|
(fetchpatch {
|
||||||
|
name = "fix-n-descrambling.patch";
|
||||||
|
url = "https://github.com/ytdl-org/youtube-dl/commit/a0068bd6bec16008bda7a39caecccbf84881c603.diff";
|
||||||
|
sha256 = "sha256-tSuEns4jputa2nOOo6JsFXpK3hvJ/+z1/ymcLsd3A6w=";
|
||||||
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [ installShellFiles makeWrapper ];
|
nativeBuildInputs = [ installShellFiles makeWrapper ];
|
||||||
|
Loading…
Reference in New Issue
Block a user