From 6963de19f688386f41a27ec436a4c42b3cd4a007 Mon Sep 17 00:00:00 2001 From: Nemo Date: Tue, 8 Jun 2021 19:52:11 +0530 Subject: [PATCH] ytdl.album --- files/bash/.bashrc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/files/bash/.bashrc b/files/bash/.bashrc index bfecf85..d17682c 100644 --- a/files/bash/.bashrc +++ b/files/bash/.bashrc @@ -592,3 +592,13 @@ starship_precmd_user_func="starship_set_win_title" eval "$(starship init bash)" [ -s "/usr/share/scm_breeze/scm_breeze.sh" ] && source "/usr/share/scm_breeze/scm_breeze.sh" + + +function ytdl.album() { + cd $(mktemp -d) + youtube-dl -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 . +} \ No newline at end of file