ytdl.album

This commit is contained in:
Nemo 2021-06-08 19:52:11 +05:30
parent 1ece8b8d18
commit 6963de19f6
1 changed files with 10 additions and 0 deletions

View File

@ -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 .
}