diff --git a/users/simon/modules/ytcc.nix b/users/simon/modules/ytcc.nix index 4b07946..2003b31 100644 --- a/users/simon/modules/ytcc.nix +++ b/users/simon/modules/ytcc.nix @@ -1,5 +1,12 @@ { lib, pkgs, ... }: - +let + ytdl-format = map (vc: "bestvideo[vcodec^=${vc}][width<=1920]+bestaudio[acodec^=opus]") [ "av01" "vp9" "avc1" ] + ++ [ + "bestvideo+bestaudio[acodec^=opus]" + "bestvideo+bestaudio" + "best" + ]; +in { xdg.configFile."ytcc/ytcc.conf".text = lib.generators.toINI { } { ytcc = { @@ -8,7 +15,7 @@ "--volume=90" "--profile=clear-speed" "--ytdl" - "--ytdl-format=bestvideo[vcodec^=avc1][width<=1920][fps<=30]+bestaudio[acodec^=opus]/bestvideo+bestaudio/best" + "--ytdl-format=${lib.concatStringsSep "/" ytdl-format}" ]; };