users/foo-dogsquared: update yt-dlp-audio configuration

This commit is contained in:
Gabriel Arazas 2023-04-24 11:14:51 +08:00
parent 6ce4b3a486
commit 9abe64cb44
No known key found for this signature in database
GPG Key ID: ADE0C41DAB221FCC
2 changed files with 17 additions and 19 deletions

View File

@ -0,0 +1,14 @@
# Don't overwrite for cautious individuals.
--no-overwrite
# To make sure all audio-related.
--extract-audio
--format bestaudio
--audio-format opus
--output '%(track_number,playlist_autonumber)d-%(track,title)s.%(ext)s'
--download-archive archive
# Add all sorts of metadata.
--embed-thumbnail
--add-metadata

View File

@ -1,24 +1,8 @@
{ config, options, lib, pkgs, ... }:
let
yt-dlp-for-audio-config = pkgs.writeText "yt-dlp-for-audio-config" ''
# Don't overwrite for cautious individuals.
--no-overwrite
# To make sure all audio-related.
--extract-audio
--format bestaudio
--audio-format opus
--output '%(track_number,playlist_autonumber)d-%(track,title)s.%(ext)s'
--download-archive archive
# Add all sorts of metadata.
--embed-thumbnail
--add-metadata
'';
yt-dlp-for-audio = pkgs.writeScriptBin "yt-dlp-audio" ''
${pkgs.yt-dlp}/bin/yt-dlp --config-location "${yt-dlp-for-audio-config}" $@
ytdlpAudio = pkgs.writeScriptBin "yt-dlp-audio" ''
${pkgs.yt-dlp}/bin/yt-dlp --config-location "${./config/yt-dlp-audio.conf}" $@
'';
getDotfiles = path: config.lib.file.mkOutOfStoreSymlink "${config.home.mutableFile."library/dotfiles".path}/${path}";
@ -36,7 +20,7 @@ in
songrec
vscodium-fhs
neovim
yt-dlp-for-audio
ytdlpAudio # My custom script for downloading music with yt-dlp.
];
fonts.fontconfig.enable = true;