Parsing a .pls on the Web UI

Is there any way I can get the Web UI to parse a particular playlist file (that comes from a local radio station via iHeartRadio.

I’ve added the station and it plays fine, but I’d like to clean up the playlist test that it displays.
This is an entry when they’re running an ad or DJ spot:

ZM text 9696 - text="ZM" song_spot="T" TAID="0" TPID="0" cartcutId="NZ000000001"

Here’s a song being played:

RUDIMENTAL FEAT ED SHEERAN - text="BLOODSTREAM" song_spot="M" TAID="0" TPID="0" cartcutId="NZ35146001"

Seems to be Artist at the front, then the song title in the text field.

Not knowing a huge amount of how php + html templates works. But would I be correct in assuming that this section in _player_engine.php is what parses the track details?

[code]$curTrack = getTrackInfo($mpd,$status[‘song’]);

if (isset($curTrack[0][‘Title’])) {
$status[‘currentartist’] = $curTrack[0][‘Artist’];
$status[‘currentsong’] = $curTrack[0][‘Title’];
$status[‘currentalbum’] = $curTrack[0][‘Album’];
$status[‘fileext’] = parseFileStr($curTrack[0][‘file’],’.’);
} else {
$path = parseFileStr($curTrack[0][‘file’],’/’);
$status[‘fileext’] = parseFileStr($curTrack[0][‘file’],’.’);
$status[‘currentartist’] = “”;
$status[‘currentsong’] = $song;
$status[‘currentalbum’] = "path: ".$path;
}[/code]

If so, in the if section I changed $status[‘currentalbum’] to ‘dc testing’ and never managed to get the UI to change.
Have I done this correctly? and would I expect to just refresh the page, or do I restart the web server (I assume apache?).

So here is the full section I tried = looking for “text=” in the song title, then using a regex to parse out the song title (the text= section and the artist name (the first section).

[code]$curTrack = getTrackInfo($mpd,$status[‘song’]);

if (isset($curTrack[0][‘Title’])) {
$pos = strpos($curTrack[0][‘Title’],‘text=’);
if ($pos === false) {
$status[‘currentartist’] = $curTrack[0][‘Artist’];
$status[‘currentsong’] = $curTrack[0][‘Title’];
//$status[‘currentalbum’] = $curTrack[0][‘Album’];
$status[‘currentalbum’] = “testing dc”;
$status[‘fileext’] = parseFileStr($curTrack[0][‘file’],’.’);
} else {
$re = “/(?‘artist’.+) \- text=\”(?‘title’.+)\" song/";
preg_match($re, $curTrack[0][‘Title’], $matches);
$status[‘currentartist’] = $matches[‘artist’];
$status[‘currentsong’] = $matches[‘song’];
$status[‘currentalbum’] = ‘ZM’;
}
} else {
$path = parseFileStr($curTrack[0][‘file’],’/’);
$status[‘fileext’] = parseFileStr($curTrack[0][‘file’],’.’);
$status[‘currentartist’] = “”;
$status[‘currentsong’] = $song;
$status[‘currentalbum’] = "path: ".$path;
}
[/code]

whoohoo…seems my code was up to scratch, it was a ui restart that I needed.

Hey Psycik, have you tried turning off the PHP cache? That might allow your changes to show up immediately. You can turn it off using the dev interface at volumio/dev.php, then you should also click the button to clear APC cache.

hah, thanks, first time I just did a reboot, 2nd restarted php5-fpm seemed to work. Didn’t know about this page, which would have made life easier.