Tagesschau UMSP Plugin

Tagesschau UMSP Plugin

Seit der neuen Firmware von B-Rad (0.4.5.1) kann man eigenen UMSP Plugins (in diesem Fall die Tagesschau) zu seiner WDlxTV Box hinzufügen.

Wie man das macht, beschreib ich euch heute in wenigen Schritten:

Als erstes braucht ihr einen FTP zugang zu eurer WDlxTV.

Wenn ihr diesn habt, so erstellt mit dem Editor auf eurem Rechner eine Datei mit dem Namen „umsp.php“. In diese Datei fügt ihr den Code:

<?php
$myMediaItems[] = array(
‚id‘ => ‚umsp://plugins/tagesschau‘, #Attribute of item
‚parentID‘ => ‚0‘, #Attribute of item
‚restricted‘ => ‚1‘, #Attribute of item
‚dc:creator‘ => ‚myCreator‘,
‚dc:title‘ => ‚ARD Tagesschau‘,
‚dc:date‘ => ‚2009-12-30‘,
‚upnp:author‘ => ‚myAuthor‘,
‚upnp:artist‘ => ‚myArtist‘,
‚upnp:album‘ => ‚myAlbum‘,
‚upnp:genre‘ => ‚myGenre‘,
‚upnp:length‘ => ‚2:10:20‘,
‚desc‘ => ‚myDesc‘,
‚upnp:class‘ => ‚object.container‘,
‚upnp:album_art’=> “,
‚duration‘ => ‚myDur3′, #Attribute of res
’size‘ => ‚mySize3‘, #Attribute of res in bytes
‚bitrate‘ => ‚myBitr‘, #Attribute of res
‚protocolInfo‘ => ‚*:*:*:*‘, #Attribute of res
‚resolution‘ => ‚myReso‘, #Attribute of res
‚colorDepth‘ => ‚myColor‘, #Attribute of res
);
?>

ein.

Diese Datei ladet ihr dann mit eurem FTP Programm auf die WDlxTV Box in den Ordner „/tmp/conf/“.

Kommen wir nun zum zweiten Teil.

Ihr erstellt wieder eine .php Datei diesmal allerdings nennt ihr sie „tagesschau.php“ und fügt das hier ein:

<?php
function _pluginMain($prmQuery) {
$reader = new XMLReader();
$episodelistXML = file_get_contents(‚http://www.tagesschau.de/export/video-podcast/webl/tagesschau/‘);
$reader->XML($episodelistXML);
while ($reader->read()) {
if ($reader->nodeType == XMLReader::ELEMENT) {
if ($reader->localName == ‚title‘) {
$title = $reader->readString (‚title‘);
} # end if
if ($reader->localName == ‚enclosure‘) {
$location = $reader->getAttribute(‚url‘);
$data = array(
‚url‘ => $location,
);
$dataString = http_build_query($data, ‚pluginvar_‘);
$retMediaItems[] = array (
‚id‘ => ‚umsp://plugins/tagesschau?‘ . $dataString,
‚dc:title‘ => $title,
‚res‘ => $location,
‚upnp:class‘ => ‚object.item.videoitem‘,
‚protocolInfo‘ => ‚http-get:*:video/mp4:*‘,
);
} # end if
} # end if
} #end while
return $retMediaItems;
} # end function
?>

Diese Datei fügt ihr dann unter „/tmp/umsp-plugins/“ ein.

Jetz geht ihr auf eurer WdlxTV unter UMSP und schaut ob alles funktioniert hat. Ein Neustart der Box ist NICHT Notwendig.

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert