Project

General

Profile

Import Enigma2 (lameDB) to TVHeadend

Added by Thomas xyz about 7 years ago

Hello,
is there a possibility to import a channel export from Dreamboxedit an Enigma 2 (VU + OpenAtV 6.0) Kanalliste in TVHeadend?

Thank you


Replies (11)

RE: Import Enigma2 (lameDB) to TVHeadend - Added by saen acro about 7 years ago

Some search in internet

<?php

// the IP address of the Enigma2 box on the network, with access to the web interface
$enigma2ip = "192.168.1.90";

// the username and password to webif, in username:password style. if you don't use password protection, just leave empty like "";
$userpass = "root:password";

// the address and port of the streaming proxy, usually the same as the box IP and port 8001
$streamaddress = "192.168.1.90:8001";

// the name of the playlist file, extension will be added automatically
$playlistfilename = "yourbox_channels_for_vlc";

// based on openwebif api at http://e2devel.com/apidoc/webif/#getallservices
//------------------------------------------------------------------------------------------------------------------------------

if(isset($_GET["xspf"])) {

if($_GET["xspf"] === "save") {

    if ($userpass != "") {
        $userpass .= "@";
    }

    $urlallsvc = "http://" . $userpass . $enigma2ip . "/web/getallservices";
    $allsvc = simplexml_load_file($urlallsvc);

    $xspf = '<?xml version="1.0" encoding="UTF-8"?>' . PHP_EOL . '<playlist xmlns="http://xspf.org/ns/0/" xmlns:vlc="http://www.videolan.org/vlc/playlist/ns/0/" version="1">' . PHP_EOL . '    <title>TV Channels</title>' . PHP_EOL . '    <trackList>' . PHP_EOL;

    $i = 0;

    foreach ($allsvc->e2bouquet as $e2bouquet) {
    $e2bouquet_name=$e2bouquet->e2servicename;

    $xspf .= '        <track>' . PHP_EOL . '            <location></location>' . PHP_EOL . '            <title>' . $e2bouquet_name . '</title>' . PHP_EOL . '        </track>' . PHP_EOL;

    foreach ($allsvc->e2bouquet[$i]->e2servicelist->e2service as $e2service) {
        $e2service_refr=$e2service->e2servicereference;
        $e2service_name=$e2service->e2servicename;
        if (strstr($e2service_refr, "1:64") != false) {
                        $xspf .= '        <track>' . PHP_EOL . '            <location></location>' . PHP_EOL . '            <title>' . $e2service_name . '</title>' . PHP_EOL . '        </track>' . PHP_EOL;
        } else {
            $xspf .= '        <track>' . PHP_EOL . '            <location>http://' . $userpass . $streamaddress . '/' . $e2service_refr . '</location>' . PHP_EOL . '            <title>' . $e2service_name . '</title>' . PHP_EOL . '        </track>' . PHP_EOL;
        }
    }
    $i = $i + 1;
    }

    $xspf .= '    </trackList>' . PHP_EOL . '</playlist>' . PHP_EOL;

    header('Content-Type: plain/text');
    header('Content-disposition: attachment; filename=' . $playlistfilename . '.xspf');
    print $xspf;

}

} else {

    print '<head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Enigma2 to VLC</title></head><body>';
    print '<h1><b>Enigma2 Channels List Converter</b></h1>';
    print 'This PHP script will download the channels list from your Enigma2 box at <b><i>' . $enigma2ip . '</i></b> and convert them to an XSPF playlist for VLC player.<br>';
    print 'The stream URLs will point to the address <b><i>' . $streamaddress . '</i></b> inside the playlist.<br>To modify the box and the URL addresses, please edit this PHP script on your server.<br>';
    print 'Please note that if the channels list on the box is big (eg. rotor list), it may take a couple of seconds to process the conversion.<br><br>';
    print '<a href="' . $_SERVER['REQUEST_URI'] . '?xspf=save">Click here to save the XSPF playlist on your PC</a><br>';

    print '</body>';

}

?>

RE: Import Enigma2 (lameDB) to TVHeadend - Added by Thomas xyz about 7 years ago

Hi, I do not know exactly what you mean?
I should ask the transmitters via the VU + WebIf and import? But how is that to go, or where I must make the settings in TVHeadend, google did not help me there unfortunately

RE: Import Enigma2 (lameDB) to TVHeadend - Added by saen acro about 7 years ago

This will get Channels from STB and make playlist, url to playlist can be added in TVH.

RE: Import Enigma2 (lameDB) to TVHeadend - Added by Thomas xyz about 7 years ago

Hi, I do not want to play a playlist of my Enigma2 Reciver in TVHEADD, but my Kanalliste which I have as lamedb or lamedb5 export in TVHeadend import. Or am I wrong?

How and where should I run your script? and where would then the Playlist in TVHeadend?

RE: Import Enigma2 (lameDB) to TVHeadend - Added by Thomas xyz about 7 years ago

Hi, thanks for the links, so I get the Muxes, however, all run into an error, as in the picture

RE: Import Enigma2 (lameDB) to TVHeadend - Added by saen acro about 7 years ago

Is there a channels mapped on Services

RE: Import Enigma2 (lameDB) to TVHeadend - Added by Thomas xyz about 7 years ago

Hi,
yes but not correct, eg. Tele 5 is yes several times before, this is not correct, the transmitter is there only once

RE: Import Enigma2 (lameDB) to TVHeadend - Added by saen acro about 7 years ago

Use checkbox to remove fake services,
you have same channel in different groups on STB that is why repeating.

RE: Import Enigma2 (lameDB) to TVHeadend - Added by Thomas xyz about 7 years ago

which checkbox, I can not find any

    (1-11/11)