[REC]';
zcopylink += ' * ';
lines[0].text += zcopylink;
// ZEEBOX HACK ZONE
*/
// RUN CLI if($argc>1) parse_str(implode('&',array_slice($argv, 1)), $_REQUEST);
$search=$radio=$artist=$title=$lnk=$lnkform=$cmd=$len="";
$search = trim(urldecode($_REQUEST['q']));
$radio = urldecode($_REQUEST['radio']);
$artist = urldecode($_REQUEST['artist']);
$title = urldecode($_REQUEST['title']);
$lnk = trim(urldecode($_REQUEST['lnk']));
$cmd="$radio|$artist|$title";
$len=strlen($artist.$title);
//$result=' ';
$result=' ';
if( $radio == "" ) { $radio = "CopyLaRadio"; }
if( $radio == "Nova zz" ) {
$artist = "undefined";
$title = "undefined";
}
// Write request for copy.sh triggering
if( $search == "REC" ) {
$result.='
♫ '.$radio.' ♫ ';
// LINK RECEIVED
if ($lnk) {
$artist="";
// Not making double request
if( ! exec('grep '.escapeshellarg($lnk).' /tmp/ytdl.list') ) {
// file_put_contents("/tmp/ytdl.list","CopyLibre||$lnk\n", FILE_APPEND);
// instead of using a relay daemon to monitor a /tmp shared file, we are going to send sbot message to make it. #zenyta SSB message.
shell_exec('/var/www/loveland/_CopyLaRadio/sbotc_zenyta.sh '. $lnk);
}
$result.='LIEN: '.$lnk.'
';
// TRACK COPY (not for undefined or local file)
} else if ($radio && $artist != $title && $artist != "undefined" && $title != "undefined" && strlen(explode(".", $title)[1]) != 3 && explode(".", $title)[1] != "opus" ) {
// Not making double request
if( ! exec('grep '.escapeshellarg($cmd).' /tmp/ytdl.list') ) {
// shell_exec('/home/pi/G1sms+/_CopyLaRadio/parle.sh "Enregistrement ajouté."');
shell_exec('/var/www/loveland/_CopyLaRadio/artist_song_to_sbotc_zenyta.sh "'. $artist . '" "' . $title .'"');
} else {
shell_exec('/var/www/loveland/_CopyLaRadio/parle.sh "Copie déjà lancée"');
}
$result.='
'.$artist.' / '.$title.'
';
// 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/ytdl.list","$radio||".PHP_EOL, FILE_APPEND);
} else {
shell_exec('/var/www/loveland/_CopyLaRadio/parle.sh "Aucun module"');
}
} else {
shell_exec('/var/www/loveland/_CopyLaRadio/parle.sh "Identification imprécise. Podcast? Fichier local?"');
}
}
$ytform = '
';
$lnkform.='';
?>
- Recherche YouTube & Copie privée