mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-31 04:58:01 +00:00
users/foo-dogsquared: add quick script for mpv YouTube playlists
This commit is contained in:
parent
90210fde9c
commit
79a144aad6
@ -28,6 +28,22 @@ in
|
|||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
hledger # Trying to be a good accountant.
|
hledger # Trying to be a good accountant.
|
||||||
|
|
||||||
|
# For now, it is not possible to easily play YouTube playlists until it
|
||||||
|
# is fixed in mpv (or yt-dlp). Ideally, this would be a Python script
|
||||||
|
# but I don't know jack using yt-dlp as a Python module.
|
||||||
|
(pkgs.writeShellApplication {
|
||||||
|
name = "play-mpv-playlist-from-youtube-playlist";
|
||||||
|
runtimeInputs = with pkgs; [
|
||||||
|
config.programs.mpv.package
|
||||||
|
yt-dlp
|
||||||
|
];
|
||||||
|
text = ''
|
||||||
|
yt-dlp --print id "$1" \
|
||||||
|
| xargs -I{} echo "https://www.youtube.com/watch?v={}" \
|
||||||
|
| mpv --playlist=-
|
||||||
|
'';
|
||||||
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
fonts.fontconfig.enable = true;
|
fonts.fontconfig.enable = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user