[[ $er ]] && echo $er

This commit is contained in:
qo-op 2020-06-04 15:49:29 +02:00
parent 448fea3844
commit d38037b087
1 changed files with 2 additions and 0 deletions

View File

@ -3,6 +3,7 @@ ARTIST=$1
SONG=$2
export YOU=$(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1) || er+=" ipfs daemon not running"
[[ $er ]] && echo $er
echo '
__
@ -33,6 +34,7 @@ echo $SONG
# %EDlmG9QW2U2wYnvIIKf//GrDxYoQWGL/Jk3Nw0obi8M=.sha256
# http://golly.sourceforge.net/
mysearch="$ARTIST $SONG"
mkdir -p /home/$YOU/.zen/music/${artist}/${song}/
youtube-dl --default-search ytsearch1: --download-archive /home/$YOU/.ytdl.list --continue --no-overwrites --metadata-from-title "$artist - %(title)s" --add-metadata --embed-thumbnail --ignore-errors -f m4a --extract-audio -o "/home/$YOU/.zen/music/${artist}/${song}/%(id)s.%(title)s.%(uploader_id)s.%(ext)s" "$mysearch" >> /tmp/youtube-dl.log 2>&1
# Finaly this is made directly....