diff --git a/www/LOVELand/_CopyLaRadio/artist_song_to_sbotc_zenyta.sh b/www/LOVELand/_CopyLaRadio/artist_song_to_sbotc_zenyta.sh index c46c7c5..cea86ee 100755 --- a/www/LOVELand/_CopyLaRadio/artist_song_to_sbotc_zenyta.sh +++ b/www/LOVELand/_CopyLaRadio/artist_song_to_sbotc_zenyta.sh @@ -34,9 +34,11 @@ 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" --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... +### COULD BE EXTENDED ยงยงยงยง +# TODO use sbotc message to benefit from ./zen/ssb_GET_zenyta.sh harvesting 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"');