Reply To: FireSpiff – Export XML playlist (XSPF)

#15063
blamm
Participant

Hi.

I have managed to get this working with a bit of XSL and PHP on my local WAMP server to transform the results of an RSP query on playlist 1. I know very little about coding so this is a real lashup (which you can probably tell from my code) so feel free to try and ask questions however I may not be able to provide much support. In fact any suggestions or improvements would be very welcome.

The XSPF works in both VLC and Foobar2000 (with the foo_xspf component). Unfortunately Foo doesnt seem to like playing streamed wavs from Firefly which is a bit of a limitation for those of use who stuff that Firefly has to transcode. VLC works fine but has limited navigation.

Put the following in an file called “rsp2xspf.xsl”. You will need to replace the Firefly server address and port.









http://192.168.2.10:3689/rsp/stream/









Put this in a file called “playlist.php”. You will need to change the port.

<?php
header('Content-type: application/xspf+xml');
header('Content-Disposition: attachment; filename="playlist.xspf"');
$dom = new domDocument();
$dom->load("rsp2xspf.xsl");
$proc = new xsltprocessor;
$xsl = $proc->importStylesheet($dom);

$document = new DomDocument();
$document->load("http://localhost:3689/rsp/db/1?type=browse");
print $proc->transformToXml($document);
?>

Put both files in a folder on your web server.

Run the php file from your browser. It should churn for a few mins then ask you to download an XSPF. Open the XSPF in VLC or Foobar2000 and play away.

Its not fast but seems to work.