2020-06-04 06:23:22 +02:00
|
|
|
#!/bin/bash
|
|
|
|
ARTIST=$1
|
|
|
|
SONG=$2
|
|
|
|
|
2020-06-04 15:46:32 +02:00
|
|
|
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"
|
2020-06-04 15:49:29 +02:00
|
|
|
[[ $er ]] && echo $er
|
2020-06-04 15:46:32 +02:00
|
|
|
|
2020-06-04 06:23:22 +02:00
|
|
|
echo '
|
|
|
|
__
|
|
|
|
__ _____ ______________ ___ __ / /
|
|
|
|
/ / / / _ \/ ___/ ___/ __ `/ / / / / /
|
|
|
|
/ /_/ / __(__ |__ ) /_/ / /_/ / /_/
|
|
|
|
\__, /\___/____/____/\__,_/\__, / (_)
|
|
|
|
/____/ /____/
|
|
|
|
|
|
|
|
identifying'
|
|
|
|
echo $ARTIST
|
|
|
|
echo $SONG
|
|
|
|
# WHOAMI=$(sbotc whoami | jq -r .id)
|
|
|
|
# sbotc query.read '{"query":[{"$filter":{"value":{"author": "'"$WHOAMI"'", "content":{"type":"zenyta"}}}}]}' | jq -r .value?.content?.text | tail -n 1
|
|
|
|
# this command is reagularly is run in cron_MINUTE.sh so your stations then take cae to miammiam.sh your youtube search
|
|
|
|
#
|
|
|
|
# We must transform that input information into link to copy from
|
|
|
|
# We are going to use youtube-dl dry run.
|
|
|
|
|
|
|
|
# http://golly.sourceforge.net/
|
|
|
|
# [@Christian Bundy](@+oaWWDs8g73EZFUMfW37R/ULtFEjwKN/DczvdYihjbU=.ed25519)
|
|
|
|
# thanks for your security hole spotting..
|
|
|
|
# I know that this could become a badly used account...
|
|
|
|
|
|
|
|
# It will be introduced as a learning account. (being able to regenerate).
|
|
|
|
# the above algo rythm is calibrated on the "game of life" mixed with angel problem solution.
|
|
|
|
# will it produce "speeders shapings" i hope...
|
|
|
|
# %EDlmG9QW2U2wYnvIIKf//GrDxYoQWGL/Jk3Nw0obi8M=.sha256
|
|
|
|
# http://golly.sourceforge.net/
|
|
|
|
mysearch="$ARTIST $SONG"
|
2020-06-04 16:07:23 +02:00
|
|
|
su $YOU -c mkdir -p /home/$YOU/.zen/music/${artist}/${song}/
|
2020-06-04 16:09:03 +02:00
|
|
|
su $YOU -c youtube-dl --default-search ytsearch1: --download-archive /home/$YOU/.ytdl.list --write-thumbnail --continue --no-overwrites --write-info-json --no-mtime --metadata-from-title "$artist - %(title)s" --embed-thumbnail --ignore-errors --audio-format mp3 --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
|
2020-06-04 06:23:22 +02:00
|
|
|
|
|
|
|
# Finaly this is made directly....
|
|
|
|
# so it is not put on ipfs... zenTag must attach contracts...
|
|
|
|
|
2020-06-04 16:14:51 +02:00
|
|
|
### COULD BE EXTENDED §§§§
|
|
|
|
# TODO use sbotc message to benefit from ./zen/ssb_GET_zenyta.sh harvesting
|