mirror of https://github.com/captn3m0/dotfiles.git
ytdl.album
This commit is contained in:
parent
1ece8b8d18
commit
6963de19f6
|
@ -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 .
|
||||
}
|
Loading…
Reference in New Issue