yt-dlp: add settings option

This commit is contained in:
Loïc Reynier 2022-09-09 09:56:07 +02:00 committed by Robert Helgesson
parent 41790ba656
commit f5e4614c11
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89
6 changed files with 75 additions and 12 deletions

View file

@ -0,0 +1 @@
{ yt-dlp-simple-config = ./yt-dlp-simple-config.nix; }

View file

@ -0,0 +1,8 @@
--downloader aria2c
--downloader-args aria2c:'-c -x8 -s8 -k1M'
--no-embed-subs
--embed-thumbnail
--sub-langs all
--trim-filenames 30
--config-locations /home/user/.yt-dlp.conf

View file

@ -0,0 +1,27 @@
{ ... }:
{
programs.yt-dlp = {
enable = true;
settings = {
embed-thumbnail = true;
embed-subs = false;
sub-langs = "all";
downloader = "aria2c";
downloader-args = "aria2c:'-c -x8 -s8 -k1M'";
trim-filenames = 30;
};
extraConfig = ''
--config-locations /home/user/.yt-dlp.conf
'';
};
test.stubs.yt-dlp = { };
nmt.script = ''
assertFileExists home-files/.config/yt-dlp/config
assertFileContent home-files/.config/yt-dlp/config ${
./yt-dlp-simple-config-expected
}
'';
}