...
|
...
|
@@ -157,18 +157,32 @@ function get_shoutcast_tags($string) {
|
157
|
157
|
|
158
|
158
|
function get_fipradio_tags() {
|
159
|
159
|
$metadata = array();
|
160
|
|
- $jsondata=file_get_contents("http://www.fipradio.fr/sites/default/files/import_si/si_titre_antenne/FIP_player_current.json");
|
|
160
|
+ # $jsondata=file_get_contents("http://www.fipradio.fr/sites/default/files/import_si/si_titre_antenne/FIP_player_current.json");
|
|
161
|
+ $jsondata=file_get_contents("https://www.fip.fr/livemeta/7");
|
161
|
162
|
$array_json = json_decode($jsondata,TRUE);
|
162
|
163
|
$fipradio_artist = "An Error Occured";
|
163
|
|
- $fipradio_title = "An Error Occured";
|
|
164
|
+ $fipradio_title = "An Error Occured";
|
164
|
165
|
$fipradio_url = "";
|
165
|
|
- if( isset($array_json["current"]["song"]) ) {
|
|
166
|
+/* if( isset($array_json["current"]["song"]) ) {
|
166
|
167
|
$fipradio_title=$array_json["current"]["song"]["titre"];
|
167
|
168
|
if( isset($array_json["current"]["song"]["interpreteMorceau"]) ) {
|
168
|
169
|
$fipradio_artist=$array_json["current"]["song"]["interpreteMorceau"];
|
169
|
170
|
}
|
170
|
171
|
$fipradio_url=$array_json["current"]["song"]["visuel"]["small"];
|
171
|
|
- }
|
|
172
|
+ }
|
|
173
|
+ */
|
|
174
|
+ if( isset($array_json["levels"][0]["position"]) ) {
|
|
175
|
+ $position=$array_json["levels"][0]["position"];
|
|
176
|
+ $trid=$array_json["levels"][0]["items"][$position];
|
|
177
|
+ $title=$array_json["steps"][$trid]["title"];
|
|
178
|
+ $fipradio_title=strtolower(trim($title));
|
|
179
|
+ $artist=$array_json["steps"][$trid]["authors"];
|
|
180
|
+ $fipradio_artist=strtolower(trim($artist));
|
|
181
|
+ if( isset($array_json["steps"][$trid]["visual"]) ) {
|
|
182
|
+ $fipradio_url=$array_json["steps"][$trid]["visual"];
|
|
183
|
+ }
|
|
184
|
+ }
|
|
185
|
+
|
172
|
186
|
$metadata[0]=$fipradio_artist;
|
173
|
187
|
$metadata[1]=$fipradio_title;
|
174
|
188
|
$metadata[2]=$fipradio_url;
|
...
|
...
|
@@ -233,7 +247,7 @@ function get_classic21_tags() {
|
233
|
247
|
$pos_start = strlen("radioplayer.playing.receive(");
|
234
|
248
|
$pos_end = strlen( $fake_json_data ) - 1;
|
235
|
249
|
$jsondata = substr($fake_json_data, $pos_start, $pos_end - $pos_start );
|
236
|
|
- $array_json = json_decode($jsondata,TRUE);
|
|
250
|
+ $array_json = json_decode($jsondata,TRUE);
|
237
|
251
|
$classic21_artist = "An Error Occured";
|
238
|
252
|
$classic21_title = "An Error Occured";
|
239
|
253
|
$classic21_url = "";
|
...
|
...
|
@@ -388,7 +402,7 @@ function get_finfo_tags() {
|
388
|
402
|
if( false !== $pos_start ) {
|
389
|
403
|
$SEARCHSUB2='</a>';
|
390
|
404
|
$pos_stop = strpos($item_content, $SEARCHSUB2, $pos_start );
|
391
|
|
- $finfo_title = substr($item_content, $pos_start+strlen($SEARCHSUB), $pos_stop - $pos_start - strlen($SEARCHSUB) );
|
|
405
|
+ $finfo_title = "Next : ".substr($item_content, $pos_start+strlen($SEARCHSUB), $pos_stop - $pos_start - strlen($SEARCHSUB) );
|
392
|
406
|
//~ $finfo_title = substr($item_content, $pos_start+strlen($SEARCHSUB));
|
393
|
407
|
//~ echo "=====\n";
|
394
|
408
|
}
|
...
|
...
|
@@ -550,7 +564,9 @@ if( $DEBUG != 0 )
|
550
|
564
|
//~ echo "Load done\n";
|
551
|
565
|
//~ exit(0);
|
552
|
566
|
//$xsl_contents = file_get_contents( "https://files.kawi.fr:8000/status.xsl" );
|
553
|
|
-$xsl_contents = getSSLPage("https://files.kawi.fr:8000/status.xsl" );
|
|
567
|
+//$xsl_contents = getSSLPage("https://files.kawi.fr:8000/status.xsl" );
|
|
568
|
+//$xsl_contents = getSSLPage("https://kawi.fr/listen/status.xsl" );
|
|
569
|
+$xsl_contents = file_get_contents("http://127.0.0.1:8000/status.xsl" );
|
554
|
570
|
$xsl_contents_utf8 = mb_convert_encoding($xsl_contents, 'HTML-ENTITIES', "UTF-8");
|
555
|
571
|
$doc = new DOMDocument();
|
556
|
572
|
$doc->loadHTML($xsl_contents_utf8);
|