l radio: filter other music out

This commit is contained in:
lassulus 2020-04-18 09:32:38 +02:00
parent 0715c3cba9
commit 8772a311a8

View File

@ -12,7 +12,7 @@ let
music_dir = "/home/radio/music";
add_random = pkgs.writeDashBin "add_random" ''
${pkgs.mpc_cli}/bin/mpc add "$(${pkgs.findutils}/bin/find "${music_dir}/the_playlist" | grep '\.ogg$' | shuf -n1 | sed 's,${music_dir}/,,')"
${pkgs.mpc_cli}/bin/mpc add "$(${pkgs.findutils}/bin/find "${music_dir}/the_playlist" | grep -v '/other/' | grep '\.ogg$' | shuf -n1 | sed 's,${music_dir}/,,')"
'';
skip_track = pkgs.writeBashBin "skip_track" ''