yt-dlp: generate config if settings or extraConfig are defined (#4018)
Previously, the config was generated only if settings were defined. In a case where settings weren't defined, extraConfig was ignored.
This commit is contained in:
parent
58eb968c21
commit
d1f04b0f36
4 changed files with 31 additions and 5 deletions
|
|
@ -66,9 +66,11 @@ in {
|
|||
config = mkIf cfg.enable {
|
||||
home.packages = [ cfg.package ];
|
||||
|
||||
xdg.configFile."yt-dlp/config" = mkIf (cfg.settings != { }) {
|
||||
text = concatStringsSep "\n"
|
||||
(remove "" (renderSettings cfg.settings ++ [ cfg.extraConfig ])) + "\n";
|
||||
};
|
||||
xdg.configFile."yt-dlp/config" =
|
||||
mkIf (cfg.settings != { } || cfg.extraConfig != "") {
|
||||
text = concatStringsSep "\n"
|
||||
(remove "" (renderSettings cfg.settings ++ [ cfg.extraConfig ]))
|
||||
+ "\n";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue