yt-dlp: add settings option
This commit is contained in:
parent
41790ba656
commit
f5e4614c11
6 changed files with 75 additions and 12 deletions
1
tests/modules/programs/yt-dlp/default.nix
Normal file
1
tests/modules/programs/yt-dlp/default.nix
Normal file
|
|
@ -0,0 +1 @@
|
|||
{ yt-dlp-simple-config = ./yt-dlp-simple-config.nix; }
|
||||
|
|
@ -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
|
||||
|
||||
27
tests/modules/programs/yt-dlp/yt-dlp-simple-config.nix
Normal file
27
tests/modules/programs/yt-dlp/yt-dlp-simple-config.nix
Normal 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
|
||||
}
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue