spacer
spacer search

SwissCenter

Search
spacer
Main Menu
Home
Documentation + FAQ
Screenshots
Downloads
Forums
Bug Tracking
History
Login
Username

Password

Remember me
?
No account yet?

Locations of visitors to this page

 
Home arrow Forums

SwissCenter Forums  


Now Playing for radio station .977 Music - 2008/10/17 09:35 The “Now Playing”-screen is limited to cats “listen to music” and “last.fm”. For normal internet radio there is a standard page. With ticket 167 this may change, but not yet ready yet.

For those interested in a “Now Playing”-screen for radio station “.977 music” (broadcaster with 10 different stations), I created one (with massive support from the admins). Pls be aware it's fully hard coded and applies to this broadcaster only. However, it will give you an idea how it may look like in the future.


EDITED INSTRUCTION

To get this addition, you should:

[1] get files
Download the attached zip file unzip it and paste the “image_screen.php” into folder “’/baseAFTER you’ve made a copy of the original file. Copy file “977_logo.gif” into folder “/images”.

[2] adjust file “/music_radio_image.php
Lines 15-16 of file “/music_radio_image.php” need to be altered into
Code:

       echo "1|$transition| |$url|\n";     echo "1|$transition| |$url|\n";


[3] adjust file style.ini in the images directory
Add
Code:

 NOW_977_ALBUMART 977_logo.gif

to the file “style.ini[/] within directory “[i]/images”. I recommend to insert the line somewhere around line 217.

[4] add “.977” to your list of countries
Add “.977” to your list of countries in file “/ext/iradio/countries.txt”. As such this isn’t very fancy, but it’s only temporary (see this thread and ticket 164).

[5] add [CHANNEL] to your language file
Add [CHANNEL] plus the translation to your specific language file in “/lang”. In case of English you have to adjust file “/lang/en.xml” and it looks like:
Code:

  <string> <id>CHANNEL</id>  <text>Channel</text>  <version>1.21.1</version> </string>

For Dutch you have to change file “/lang/nl.xml” and add
Code:

  <string> <id>CHANNEL</id>  <text>Kanaal</text>  <version>1.21.1</version> </string>


[6] have fun

For Synology users, please go here.

Comments are welcomed.

regards, Klaas


FILE REMOVED (SEE NEXT POST)

---------------------------------------------------------------------------
SwissCenter SVN 1104
Simese 1.40 / PHP 4.4.4 / MySQL 4.0.21 / Windows XP
Apache 2.2.8 / PHP 5.2.6 / MySQL 5.0.51b / Linux Synology 2.6.15
Synology DS107+ (128), firmware: DSM 2.0-0702
Pinnacle SC200
  | | The administrator has disabled public write access.
Re: Now Playing for radio station .977 Music - 2008/10/17 13:48 The file contained a code error causing a partial mix-up between some stations. The attached file should be fine.

regards, Klaas


File Attachment:
File name: 977_now_playing_2.zip
File size:16955 bytes

---------------------------------------------------------------------------
SwissCenter SVN 1104
Simese 1.40 / PHP 4.4.4 / MySQL 4.0.21 / Windows XP
Apache 2.2.8 / PHP 5.2.6 / MySQL 5.0.51b / Linux Synology 2.6.15
Synology DS107+ (128), firmware: DSM 2.0-0702
Pinnacle SC200
  | | The administrator has disabled public write access.
Re: Now Playing for radio station .977 Music - 2008/10/20 11:32 Then you should change line 15-16 into:Code:

echo "1|$transition| |$url|\n";
echo "1|$transition| |$url|\n";


Why isn't this code change already in the file if it is necessary? In the file, line 15 and 16 are comment lines.

I think this code change is supposed to be made in music_radio_image.php

To have easy access to the stations, you can add “.977” to your list of countries.

Where is this done?

I found this file in the data\ext\iradio dir

Furthermore, you should add [CHANNEL] with applicable translation to your language file in directory /lang/.

How?

This doesn't appear necessary if English is your language
Showcenters 1000g/200/250HD Popcorn Hour A-100
Netgear HDX101 Powerline Adapters
Windows XP Simese 2.07 running latest SVN
NAS Server IBM NetVista 900Mhz/256RAM


  | | The administrator has disabled public write access.
Re: Now Playing for radio station .977 Music - 2008/10/20 13:51 Ok, I've got the now playing screen with artist and track information which appears to update. However, I've got no image(s). Showcenters 1000g/200/250HD Popcorn Hour A-100
Netgear HDX101 Powerline Adapters
Windows XP Simese 2.07 running latest SVN
NAS Server IBM NetVista 900Mhz/256RAM


  | | The administrator has disabled public write access.
Re: Now Playing for radio station .977 Music - 2008/10/20 14:01 I've got no image
You'll need to define NOW_977_ALBUMART in your style.ini and specify the actual image file.

This solution whilst nice is a bit too specific and relies on too many hardcoded details which could break in future.

I'm working on a generic solution which gets details directly from the radio server instead of a hardcoded webpage, though will not have a specific image for each station.

Nigel
Player : Netgear EVA700 & Popcorn A-100 (081224)
Server : Vista SP1 Home Premium (Simese 2.06, SwissCenter current SVN)
Spec : Intel C2Q Q6600, 2GB RAM, 2Tb storage.
  | | The administrator has disabled public write access.
Re: Now Playing for radio station .977 Music - 2008/10/20 14:22 You'll need to define NOW_977_ALBUMART in your style.ini and specify the actual image file.
Aha! Edited the style.ini in the images directory as follows.

NOW_977_ALBUMART = 977_logo.gif

and we have an image

This solution whilst nice
Well, if anyone else wants to try it (now that the directions have been tidied up a bit) it does work and 977 does give a good variety of stations.

I'm working on a generic solution
Excellent!
Showcenters 1000g/200/250HD Popcorn Hour A-100
Netgear HDX101 Powerline Adapters
Windows XP Simese 2.07 running latest SVN
NAS Server IBM NetVista 900Mhz/256RAM


  | | The administrator has disabled public write access.
Re: Now Playing for radio station .977 Music - 2008/10/20 15:02 Well....

While this solution works great on the ShowCenter... when I try to use the PCH, it starts playing but then kicks me back to the menu.

Any ideas?
Showcenters 1000g/200/250HD Popcorn Hour A-100
Netgear HDX101 Powerline Adapters
Windows XP Simese 2.07 running latest SVN
NAS Server IBM NetVista 900Mhz/256RAM


  | | The administrator has disabled public write access.
Re: Now Playing for radio station .977 Music - 2008/10/20 15:35 when I try to use the PCH, it starts playing but then kicks me back to the menu
This is why Last.FM is not yet working.
Player : Netgear EVA700 & Popcorn A-100 (081224)
Server : Vista SP1 Home Premium (Simese 2.06, SwissCenter current SVN)
Spec : Intel C2Q Q6600, 2GB RAM, 2Tb storage.
  | | The administrator has disabled public write access.
Re: Now Playing for radio station .977 Music - 2008/10/20 23:57 Stu2j wrote:Well, if anyone else wants to try it (now that the directions have been tidied up a bit) it does work and 977 does give a good variety of stations.
I've change the instruction a bit, so everything is there within the first post. Later on I’ll submit a couple additional radio stations, like Absolute Radio (previously Virgin Radio), also with various channels

regards, Klaas

---------------------------------------------------------------------------
SwissCenter SVN 1104
Simese 1.40 / PHP 4.4.4 / MySQL 4.0.21 / Windows XP
Apache 2.2.8 / PHP 5.2.6 / MySQL 5.0.51b / Linux Synology 2.6.15
Synology DS107+ (128), firmware: DSM 2.0-0702
Pinnacle SC200
  | | The administrator has disabled public write access.
Re: Now Playing for radio station .977 Music - 2008/10/25 15:12 Hey Klass -

Now that this has been fully implemented by the Swiss team...

Is there a way to get the now playing screen back for .977 (and the other "broadcast stations") without overwriting their files etc?

Along that line, how will following the above steps now affect what the developers have done?
Showcenters 1000g/200/250HD Popcorn Hour A-100
Netgear HDX101 Powerline Adapters
Windows XP Simese 2.07 running latest SVN
NAS Server IBM NetVista 900Mhz/256RAM


  | | The administrator has disabled public write access.
Re: Now Playing for radio station .977 Music - 2008/10/26 19:01 Hi Stu,

Stu wrote:Is there a way to get the now playing screen back for .977 (and the other "broadcast stations") without overwriting their files etc?
I don’t think so. I although I’m sure it is possible to generate track info outside the current files, the info needs to be called by file “/base/image_screens.php” to get in on the screen. This means that this file always needs to adjusted.

On the other hand, it doesn’t change very often and to get the “.977 Now Playing-screen is not that much work. Basically, you have to copy additional code into the file and your done. In the attached file it’s row 88 until and including row 303.

So far I’ve “Now Playing”-screens for .977 (10 channels) and Absolute Radio (3 channels) and KinK Aardschok (Dutch Rock Channel). The approach to Absolute Radio and Kink is slightly different to .977 as the track info from the latter comes from their website, while the info of the first two comes from the respective servers.

If you like to have the latest radio screen as implemented by Nigel, except for .977, Absolute and (if you like) KinK, then paste file “image_screens.php” into directory “/base, the images files including “style.ini” into directory “/images[i]” and finally directory “[i]sc_parser” into the main SwissCenter directory. This directory contains the files that parses the server info. This info is called in file “image_screens.php” by rows 202 through 213. You should change the server IP and port into yours. And then it should work (if I didn’t forget anything ... )

I’m pretty sure that the code could be more efficient and elegant, but I’m no expert in PHP and I don’t know how to do it; maybe I’ll find out somewhere in time ...

Do you have any other broadcasters in mind that you want to play with such a “Now Playing”-screen?

regards, Klaas


File Attachment:
File name: klaas_radio_np.zip
File size:38757 bytes

---------------------------------------------------------------------------
SwissCenter SVN 1109
Simese 1.40 / PHP 4.4.4 / MySQL 4.0.21 / Windows XP
Apache 2.2.8 / PHP 5.2.6 / MySQL 5.0.51b / Linux Synology 2.6.15
Synology DS107+ (128), firmware: DSM 2.0-0702
Pinnacle SC200
  | | The administrator has disabled public write access.
Re: Now Playing for radio station .977 Music - 2008/10/26 23:44 Hi Klaas!

Thank you so much for your time on this.

If you like to have the latest radio screen as implemented by Nigel, except for .977, Absolute and (if you like) KinK,
ok.. .977 is working great again..

With absolute, I get the now playing screen and the artwork but I don't get the artist and track information. I don't know what "Kink" is as that doesn't show up in the broadcast list.

Do you have any other broadcasters in mind that you want to play with such a “Now Playing”-screen?
Can you do it with Sky.FM?
Showcenters 1000g/200/250HD Popcorn Hour A-100
Netgear HDX101 Powerline Adapters
Windows XP Simese 2.07 running latest SVN
NAS Server IBM NetVista 900Mhz/256RAM


  | | The administrator has disabled public write access.
Re: Now Playing for radio station .977 Music - 2008/10/27 03:07 Hi Stu,

There could be two reasons, that Absolute and (probably also) KinK aren’t working.

[1] directory “sc_parser” including all “sc”-files should be copied to the main directory of SwissCenter;
[2] file “/base/image_screens” must be adjusted; change the server’s ip and port number in row 202 through 213 into yours. Eg
Code:

      elseif ($station_name == 'Absolute Classic Rock, live from London, UK Hi BR MP3')           {$html file_get_contents('http://192.168.1.2:8050/sc_parser/sc_absolute_classic_rock.php');           $html_a file_get_contents('http://192.168.1.2:8050/sc_parser/sc_absolute_classic_rock.php');}

Change IP 192.168.1.2 and port 8050 according your set-up.

If it’s still not working as it should , can you check whether there’s a difference between “Absolute Classic Rock” and the other two Absolute Channels? Moreover, if you enter
Code:

 http://<SERVER IP>:<SERVER PORT>/sc_parser/sc_absolute_radio_rm.php

in your browser, does it return anything?


Stu wrote:… don't know what "Kink" is as that doesn't show up in the broadcast list.KinK is a Dutch broadcaster with three channel for alternative and rock music. Have a look here. If you like the music you can add the station to file “/ext/iradio/broadcasters.txt”, and it will appear in your list of broadcasters.

Stu wrote: Can you do it with Sky.FM?Yep, no problem, will do.

regards, Klaas

---------------------------------------------------------------------------
SwissCenter SVN 1109
Simese 1.40 / PHP 4.4.4 / MySQL 4.0.21 / Windows XP
Apache 2.2.8 / PHP 5.2.6 / MySQL 5.0.51b / Linux Synology 2.6.15
Synology DS107+ (128), firmware: DSM 2.0-0702
Pinnacle SC200
  | | The administrator has disabled public write access.
Re: Now Playing for radio station .977 Music - 2008/10/27 09:38 Hi Klaas -

[1] directory “sc_parser” including all “sc”-files should be copied to the main directory of SwissCenter;
Yep.. did that.

[2] file “/base/image_screens” must be adjusted; change the server’s ip and port number in row 202 through 213 into yours.
Yep.. did that.


http://<SERVER IP>:<SERVER PORT>/sc_parser/sc_absolute_radio_rm.php
Entering this returns the following in the browser:

Warning: file_get_contents() expects at most 2 parameters, 3 given in C:\Documents and Settings\All Users\Application Data\Simese\Data\sc_parser\sc_absolute_radio_rm.php on line 19

Thanks.
Showcenters 1000g/200/250HD Popcorn Hour A-100
Netgear HDX101 Powerline Adapters
Windows XP Simese 2.07 running latest SVN
NAS Server IBM NetVista 900Mhz/256RAM


  | | The administrator has disabled public write access.
Re: Now Playing for radio station .977 Music - 2008/10/27 16:29 Hi Stu,

The code of the “parser-files wasn’t fit for PHP4, causing the problem; I’ve revised the code and you should try it again. Besides there are “Now Playing”-screens for Absolute, KinK and Disney Tunes Radio Network. Sky.FM is coming up.

regards, Klaas


File Attachment:
File name: klaas_radio_np_2.zip
File size:55069 bytes

---------------------------------------------------------------------------
SwissCenter SVN 1109
Simese 1.40 / PHP 4.4.4 / MySQL 4.0.21 / Windows XP
Apache 2.2.8 / PHP 5.2.6 / MySQL 5.0.51b / Linux Synology 2.6.15
Synology DS107+ (128), firmware: DSM 2.0-0702
Pinnacle SC200
  | | The administrator has disabled public write access.
Re: Now Playing for radio station .977 Music - 2008/10/27 16:46 Hi Klaas,

Just a quick comment on your code, why do you get the pages multiple times?

Code:

 $html file_get_contents('http://www.977music.com/channels/80s/current.html'); $html_a file_get_contents('http://www.977music.com/channels/80s/current.html'); $html_y file_get_contents('http://www.977music.com/channels/80s/current.html');

Player : Netgear EVA700 & Popcorn A-100 (081224)
Server : Vista SP1 Home Premium (Simese 2.06, SwissCenter current SVN)
Spec : Intel C2Q Q6600, 2GB RAM, 2Tb storage.
  | | The administrator has disabled public write access.
Re: Now Playing for radio station .977 Music - 2008/10/27 17:03 Hi Nigel,

Well, not all channels contain track title, artist and year; in order to make the labels disappear when empty, I've defined $html, $html_a and $html_y. In rows 284 and 290 this is effectuated.

Any clue how to make this more efficient?

regards, Klaas

---------------------------------------------------------------------------
SwissCenter SVN 1109
Simese 1.40 / PHP 4.4.4 / MySQL 4.0.21 / Windows XP
Apache 2.2.8 / PHP 5.2.6 / MySQL 5.0.51b / Linux Synology 2.6.15
Synology DS107+ (128), firmware: DSM 2.0-0702
Pinnacle SC200
  | | The administrator has disabled public write access.
Re: Now Playing for radio station .977 Music - 2008/10/27 17:16 Hi Klaas..

Everything is working great!!

Look forward to getting Sky.fm

Thanks!
Showcenters 1000g/200/250HD Popcorn Hour A-100
Netgear HDX101 Powerline Adapters
Windows XP Simese 2.07 running latest SVN
NAS Server IBM NetVista 900Mhz/256RAM


  | | The administrator has disabled public write access.
Re: Now Playing for radio station .977 Music - 2008/10/27 19:04 Klaas,

Here's how I'd do image_screens.php (zipped).

Edit: removed code, superseded.

It really comes down to personal programming style but I think this is easier to understand.
Player : Netgear EVA700 & Popcorn A-100 (081224)
Server : Vista SP1 Home Premium (Simese 2.06, SwissCenter current SVN)
Spec : Intel C2Q Q6600, 2GB RAM, 2Tb storage.
  | | The administrator has disabled public write access.
Re: Now Playing for radio station .977 Music - 2008/10/28 12:53 Hi Nigel,

Thanks for tidying the script, regards, Klaas

---------------------------------------------------------------------------
SwissCenter SVN 1109
Simese 1.40 / PHP 4.4.4 / MySQL 4.0.21 / Windows XP
Apache 2.2.8 / PHP 5.2.6 / MySQL 5.0.51b / Linux Synology 2.6.15
Synology DS107+ (128), firmware: DSM 2.0-0702
Pinnacle SC200
  | | The administrator has disabled public write access.
Re: Now Playing for radio station .977 Music - 2008/10/28 13:41 Hi Nigel,

I got problems to parse the track info from “Sky.FM” (like 80s, 80s, 80s). For common broadcasters I can use the following script:
Code:

 <HTML> <HEAD>  <TITLE>File Info Absolute Classic Rock</TITLE> </HEAD> <BODY> <?php //change to shoutcast server url location  $host     "85.159.184.44"$port     "80"$U     "admin"$Pdoo     "devnull"$fp = @fsockopen("$host"$port, &$errno, &$errstr30); //open connection  if(!$fp) {      $success=2;  //set if no connection  }  if($success!=2){ //if connection  fputs($fp,"GET /7.html HTTP/1.0\r\nUser-Agent: SHOUTcast Whats Playing (dstjohn) (Mozilla Compatible)\ r\n\r\n"); //get 7.html  while(!feof($fp)) {    $page .= fgets($fp1000);  }  @fclose($fp); //close connection  $page ereg_replace(".*<body>"""$page); //extract data  $page ereg_replace("</body>.*"","$page); //extract data  $numbers explode(",",$page); //extract data  $currentlisteners $numbers[0]; //set variable  $whatsplaying $numbers[6]; //set variable  echo $whatsplaying;  }

But the script doesn’t work for Sky.FM as I cannot find out the IP of Sky,FM.

As file “/music_radio_image.php” does the job, I know it should be possible. Can you give me a hint how to proceed?

many thanks & regards, Klaas

---------------------------------------------------------------------------
SwissCenter SVN 1109
Simese 1.40 / PHP 4.4.4 / MySQL 4.0.21 / Windows XP
Apache 2.2.8 / PHP 5.2.6 / MySQL 5.0.51b / Linux Synology 2.6.15
Synology DS107+ (128), firmware: DSM 2.0-0702
Pinnacle SC200
  | | The administrator has disabled public write access.
Re: Now Playing for radio station .977 Music - 2008/10/28 14:03 Here is the playlist used to stream SKY.FM - 80s, 80s, 80s

Code:

 [playlist] numberofentries=23 File1=http://scfire-ntc-aa09.stream.aol.com:80/stream/1013 Title1=(#1 - 102/500) S K Y . F M - 80s, 80s, 80s! - Hear your classic favorites right here! (www.sky.fm) Length1=-1 File2=http://scfire-ntc-aa07.stream.aol.com:80/stream/1013 Title2=(#2 - 103/500) S K Y . F M - 80s, 80s, 80s! - Hear your classic favorites right here! (www.sky.fm) Length2=-1 File3=http://scfire-ntc-aa10.stream.aol.com:80/stream/1013 Title3=(#3 - 103/500) S K Y . F M - 80s, 80s, 80s! - Hear your classic favorites right here! (www.sky.fm) Length3=-1 File4=http://scfire-dll-aa03.stream.aol.com:80/stream/1013 Title4=(#4 - 104/500) S K Y . F M - 80s, 80s, 80s! - Hear your classic favorites right here! (www.sky.fm) Length4=-1 File5=http://scfire-dtc-aa01.stream.aol.com:80/stream/1013 Title5=(#5 - 104/500) S K Y . F M - 80s, 80s, 80s! - Hear your classic favorites right here! (www.sky.fm) Length5=-1 File6=http://scfire-dtc-aa04.stream.aol.com:80/stream/1013 Title6=(#6 - 106/500) S K Y . F M - 80s, 80s, 80s! - Hear your classic favorites right here! (www.sky.fm) Length6=-1 File7=http://scfire-nyk-aa01.stream.aol.com:80/stream/1013 Title7=(#7 - 106/500) S K Y . F M - 80s, 80s, 80s! - Hear your classic favorites right here! (www.sky.fm) Length7=-1 File8=http://scfire-dtc-aa03.stream.aol.com:80/stream/1013 Title8=(#8 - 107/500) S K Y . F M - 80s, 80s, 80s! - Hear your classic favorites right here! (www.sky.fm) Length8=-1 File9=http://scfire-mtc-aa03.stream.aol.com:80/stream/1013 Title9=(#9 - 107/500) S K Y . F M - 80s, 80s, 80s! - Hear your classic favorites right here! (www.sky.fm) Length9=-1 File10=http://scfire-mtc-aa02.stream.aol.com:80/stream/1013 Title10=(#10 - 108/500) S K Y . F M - 80s, 80s, 80s! - Hear your classic favorites right here! (www.sky.fm) Length10=-1 File11=http://scfire-nyk-aa02.stream.aol.com:80/stream/1013 Title11=(#11 - 111/500) S K Y . F M - 80s, 80s, 80s! - Hear your classic favorites right here! (www.sky.fm) Length11=-1 File12=http://scfire-ntc-aa06.stream.aol.com:80/stream/1013 Title12=(#12 - 115/500) S K Y . F M - 80s, 80s, 80s! - Hear your classic favorites right here! (www.sky.fm) Length12=-1 File13=http://scfire-dtc-aa05.stream.aol.com:80/stream/1013 Title13=(#13 - 116/500) S K Y . F M - 80s, 80s, 80s! - Hear your classic favorites right here! (www.sky.fm) Length13=-1 File14=http://scfire-ntc-aa01.stream.aol.com:80/stream/1013 Title14=(#14 - 116/500) S K Y . F M - 80s, 80s, 80s! - Hear your classic favorites right here! (www.sky.fm) Length14=-1 File15=http://scfire-dll-aa02.stream.aol.com:80/stream/1013 Title15=(#15 - 118/500) S K Y . F M - 80s, 80s, 80s! - Hear your classic favorites right here! (www.sky.fm) Length15=-1 File16=http://scfire-mtc-aa04.stream.aol.com:80/stream/1013 Title16=(#16 - 121/500) S K Y . F M - 80s, 80s, 80s! - Hear your classic favorites right here! (www.sky.fm) Length16=-1 File17=http://scfire-ntc-aa08.stream.aol.com:80/stream/1013 Title17=(#17 - 122/500) S K Y . F M - 80s, 80s, 80s! - Hear your classic favorites right here! (www.sky.fm) Length17=-1 File18=http://scfire-dll-aa01.stream.aol.com:80/stream/1013 Title18=(#18 - 129/500) S K Y . F M - 80s, 80s, 80s! - Hear your classic favorites right here! (www.sky.fm) Length18=-1 File19=http://scfire-ntc-aa03.stream.aol.com:80/stream/1013 Title19=(#19 - 206/500) S K Y . F M - 80s, 80s, 80s! - Hear your classic favorites right here! (www.sky.fm) Length19=-1 File20=http://scfire-nyk-aa03.stream.aol.com:80/stream/1013 Title20=(#20 - 473/500) S K Y . F M - 80s, 80s, 80s! - Hear your classic favorites right here! (www.sky.fm) Length20=-1 File21=http://scfire-dtc-aa02.stream.aol.com:80/stream/1013 Title21=(#21 - 496/500) S K Y . F M - 80s, 80s, 80s! - Hear your classic favorites right here! (www.sky.fm) Length21=-1 File22=http://160.79.128.30:7712 Title22=(#22 - 5/5) S K Y . F M - 80s, 80s, 80s! - Hear your classic favorites right here! (www.sky.fm) Length22=-1 File23=http://207.200.96.230:8000 Title23=(#23 - 21/20) S K Y . F M - 80s, 80s, 80s! - Hear your classic favorites right here! (www.sky.fm) Length23=-1 Version=2


At the end File22, File23 contain host and port addresses. I've not tried them but I guess both should work. My implementation will use the first.

Your script is essentially doing the same as mine but I parse the playlist for the host and port whereas you have them hardcoded.

Nigel
Player : Netgear EVA700 & Popcorn A-100 (081224)
Server : Vista SP1 Home Premium (Simese 2.06, SwissCenter current SVN)
Spec : Intel C2Q Q6600, 2GB RAM, 2Tb storage.
  | | The administrator has disabled public write access.
Re: Now Playing for radio station .977 Music - 2008/10/28 14:42 Hi Nigel,

Thanks a lot, but answers often give birth to more curiosity , so I got one more question. How could I link up $host and $port (as mentioned in my script above) with the station selected iow how can I get rid off the hard coding.

regards, Klaas

---------------------------------------------------------------------------
SwissCenter SVN 1109
Simese 1.40 / PHP 4.4.4 / MySQL 4.0.21 / Windows XP
Apache 2.2.8 / PHP 5.2.6 / MySQL 5.0.51b / Linux Synology 2.6.15
Synology DS107+ (128), firmware: DSM 2.0-0702
Pinnacle SC200
  | | The administrator has disabled public write access.
Re: Now Playing for radio station .977 Music - 2008/10/28 15:24 You could use my implementation and put all your code in image_screens.php function station_playing_image. This way you wouldn't need any of your other files as station_playing_image already knows the station and now playing details. Player : Netgear EVA700 & Popcorn A-100 (081224)
Server : Vista SP1 Home Premium (Simese 2.06, SwissCenter current SVN)
Spec : Intel C2Q Q6600, 2GB RAM, 2Tb storage.
  | | The administrator has disabled public write access.
Re: Now Playing for radio station .977 Music - 2008/10/28 15:59 Well, you're completely right and I tried, but it didn't work. Could you give one example how I should do this?

many thanks in advance, regards, Klaas

---------------------------------------------------------------------------
SwissCenter SVN 1109
Simese 1.40 / PHP 4.4.4 / MySQL 4.0.21 / Windows XP
Apache 2.2.8 / PHP 5.2.6 / MySQL 5.0.51b / Linux Synology 2.6.15
Synology DS107+ (128), firmware: DSM 2.0-0702
Pinnacle SC200
  | | The administrator has disabled public write access.
Re: Now Playing for radio station .977 Music - 2008/10/28 16:22 It wouldn't be any fun for you if I did it

The $now_playing variable contains the now playing track so you can remove all your '$html = file_get_contents...' and change '$title = substr_between_strings($html,' - ',' (');' to '$title = substr_between_strings($now_playing,' - ',' (');' etc.
Player : Netgear EVA700 & Popcorn A-100 (081224)
Server : Vista SP1 Home Premium (Simese 2.06, SwissCenter current SVN)
Spec : Intel C2Q Q6600, 2GB RAM, 2Tb storage.
  | | The administrator has disabled public write access.
Re: Now Playing for radio station .977 Music - 2008/10/28 16:53 It wouldn't be any fun for you if I did it
again very true ... but a little help is always useful to increase the joy of getting results fast.

many thanks & I gonna give it try.

regards, Klaas

---------------------------------------------------------------------------
SwissCenter SVN 1109
Simese 1.40 / PHP 4.4.4 / MySQL 4.0.21 / Windows XP
Apache 2.2.8 / PHP 5.2.6 / MySQL 5.0.51b / Linux Synology 2.6.15
Synology DS107+ (128), firmware: DSM 2.0-0702
Pinnacle SC200
  | | The administrator has disabled public write access.
Re: Now Playing for radio station .977 Music - 2008/10/28 20:57 If you're feeling ambitious then have a go at making progress with ticket #164.

It requires a new configuration page to define genres, countries, and broadcasters to replace the txt files. With the broadcasters you could also specify an image for each which would be an acceptable solution for what you are doing.

You've done the now playing screen, but to get it submitted we need it configurable
Player : Netgear EVA700 & Popcorn A-100 (081224)
Server : Vista SP1 Home Premium (Simese 2.06, SwissCenter current SVN)
Spec : Intel C2Q Q6600, 2GB RAM, 2Tb storage.
  | | The administrator has disabled public write access.
Re: Now Playing for radio station .977 Music - 2008/10/29 06:58 Hi Nigel,

Nigel wrote:If you're feeling ambitious then have a go at making progress with ticket #164.
OK, I’ll try, but probably come back to you many times with questions (if you don’t mind).

But first things first, the attached “/base/image_screens.php” is a ‘generic’ result re the radio “Now Playing”-screen in the sense that all channels with track info within “$now_playing” will get the standard “Now Playing”-screen with artist, track title and (if applicable) year separately. The channels without info will be directed to the current “Radio Now Playing”-screen, showing the channel title on top of the screen.

Directory “sc_parsers” as mentioned in the posts above is not necessary anymore and can be deleted.

regards, Klaas

File Attachment:
File name: klaas_radio_np_gen1.zip
File size:3848 bytes

PS Should this thread move to "development"?

---------------------------------------------------------------------------
SwissCenter SVN 1109
Simese 1.40 / PHP 4.4.4 / MySQL 4.0.21 / Windows XP
Apache 2.2.8 / PHP 5.2.6 / MySQL 5.0.51b / Linux Synology 2.6.15
Synology DS107+ (128), firmware: DSM 2.0-0702
Pinnacle SC200
  | | The administrator has disabled public write access.
Re: Now Playing for radio station .977 Music - 2008/10/29 07:26 For those interested in “Now Playing”-screens with AlbumArt of .977, .Kink, Absolute Radio, Disney Tunes and Sky.FM, pls paste the attached files in the respective directories.

regards, Klaas


File Attachment:
File name: klaas_radio_np_gen1_art.zip
File size:52924 bytes

---------------------------------------------------------------------------
SwissCenter SVN 1109
Simese 1.40 / PHP 4.4.4 / MySQL 4.0.21 / Windows XP
Apache 2.2.8 / PHP 5.2.6 / MySQL 5.0.51b / Linux Synology 2.6.15
Synology DS107+ (128), firmware: DSM 2.0-0702
Pinnacle SC200
  | | The administrator has disabled public write access.