From 66d8e04f4532491b8f17f1494cd27d59fa986fab Mon Sep 17 00:00:00 2001 From: qo-op Date: Thu, 4 Jun 2020 16:07:23 +0200 Subject: [PATCH 1/3] su $YOU -c mkdir -p /home/$YOU/.zen/music/${artist}/${song}/ --- www/LOVELand/_CopyLaRadio/artist_song_to_sbotc_zenyta.sh | 5 +++-- www/LOVELand/_CopyLaRadio/youtube-dl.php | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/www/LOVELand/_CopyLaRadio/artist_song_to_sbotc_zenyta.sh b/www/LOVELand/_CopyLaRadio/artist_song_to_sbotc_zenyta.sh index c46c7c5..865fb07 100755 --- a/www/LOVELand/_CopyLaRadio/artist_song_to_sbotc_zenyta.sh +++ b/www/LOVELand/_CopyLaRadio/artist_song_to_sbotc_zenyta.sh @@ -34,9 +34,10 @@ 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 +su $YOU -c mkdir -p /home/$YOU/.zen/music/${artist}/${song}/ +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" --add-metadata --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 # Finaly this is made directly.... # so it is not put on ipfs... zenTag must attach contracts... + diff --git a/www/LOVELand/_CopyLaRadio/youtube-dl.php b/www/LOVELand/_CopyLaRadio/youtube-dl.php index 715be29..e72cdb3 100644 --- a/www/LOVELand/_CopyLaRadio/youtube-dl.php +++ b/www/LOVELand/_CopyLaRadio/youtube-dl.php @@ -61,8 +61,8 @@ if( $search == "REC" ) { // RADIO EXTERNAL TRACK SCRAPERs .... } else if($radio != "" && $artist == "undefined" && $title == "undefined" ){ shell_exec('/var/www/loveland/_CopyLaRadio/parle.sh "Recherche externe pour '.$radio.'"'); - file_put_contents("/tmp/youtube-dl.log", "/home/pi/G1sms+/_CopyLaRadio/libradio/".escapeshellcmd($radio).".php".PHP_EOL, FILE_APPEND); - if ( file_exists("/home/pi/G1sms+/_CopyLaRadio/libradio/".escapeshellcmd($radio).".php") ) { + file_put_contents("/tmp/youtube-dl.log", "/var/www/loveland/_CopyLaRadio/libradio/".escapeshellcmd($radio).".php".PHP_EOL, FILE_APPEND); + if ( file_exists("/var/www/loveland/_CopyLaRadio/libradio/".escapeshellcmd($radio).".php") ) { file_put_contents("/tmp/ytdl.list","$radio||".PHP_EOL, FILE_APPEND); } else { shell_exec('/var/www/loveland/_CopyLaRadio/parle.sh "Aucun module"'); From 1abbc5bc3e43afb7b2b1734b89686546c530429a Mon Sep 17 00:00:00 2001 From: qo-op Date: Thu, 4 Jun 2020 16:09:03 +0200 Subject: [PATCH 2/3] youtube-dl goes to your localhost mpd jukebox --- www/LOVELand/_CopyLaRadio/artist_song_to_sbotc_zenyta.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/LOVELand/_CopyLaRadio/artist_song_to_sbotc_zenyta.sh b/www/LOVELand/_CopyLaRadio/artist_song_to_sbotc_zenyta.sh index 865fb07..0958934 100755 --- a/www/LOVELand/_CopyLaRadio/artist_song_to_sbotc_zenyta.sh +++ b/www/LOVELand/_CopyLaRadio/artist_song_to_sbotc_zenyta.sh @@ -35,7 +35,7 @@ echo $SONG # http://golly.sourceforge.net/ mysearch="$ARTIST $SONG" su $YOU -c mkdir -p /home/$YOU/.zen/music/${artist}/${song}/ -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" --add-metadata --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 +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 # Finaly this is made directly.... # so it is not put on ipfs... zenTag must attach contracts... From 49bfecdfa5e8650bd702ee72184c76d7ff1117b5 Mon Sep 17 00:00:00 2001 From: qo-op Date: Thu, 4 Jun 2020 16:14:51 +0200 Subject: [PATCH 3/3] TODO use sbotc message to benefit from ./zen/ssb_GET_zenyta.sh harvesting --- www/LOVELand/_CopyLaRadio/artist_song_to_sbotc_zenyta.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/www/LOVELand/_CopyLaRadio/artist_song_to_sbotc_zenyta.sh b/www/LOVELand/_CopyLaRadio/artist_song_to_sbotc_zenyta.sh index 0958934..cea86ee 100755 --- a/www/LOVELand/_CopyLaRadio/artist_song_to_sbotc_zenyta.sh +++ b/www/LOVELand/_CopyLaRadio/artist_song_to_sbotc_zenyta.sh @@ -40,4 +40,5 @@ su $YOU -c youtube-dl --default-search ytsearch1: --download-archive /home/$YOU/ # Finaly this is made directly.... # so it is not put on ipfs... zenTag must attach contracts... - +### COULD BE EXTENDED ยงยงยงยง +# TODO use sbotc message to benefit from ./zen/ssb_GET_zenyta.sh harvesting