From 220b5fe741c0ed3d3194ab095436f74cb3b2acaa Mon Sep 17 00:00:00 2001 From: Nemo Date: Wed, 23 Jun 2021 18:58:23 +0530 Subject: [PATCH] music dl updates --- files/bash/.bashrc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/files/bash/.bashrc b/files/bash/.bashrc index d17682c..1c05184 100644 --- a/files/bash/.bashrc +++ b/files/bash/.bashrc @@ -596,9 +596,16 @@ eval "$(starship init bash)" function ytdl.album() { cd $(mktemp -d) - youtube-dl -f "bestaudio[ext=m4a]" --output "audio.m4a" "$1" + youtube-dl --quiet -f "bestaudio[ext=m4a]" --output "audio.m4a" "$1" youtube-cue --audio-file "audio.m4a" "$1" tracks.cue m4acut -C tracks.cue "audio.m4a" && \ trash audio.m4a && \ beet import -map . +} + +function gaanadl.album() { + cd $(mktemp -d) + youtube-dl --quiet --autonumber-start 1 --add-metadata -o "%(autonumber)d - %(title)s.m4a" "$1" + beet import -map . + cd - } \ No newline at end of file