Use advanced transcoding that streams while transcoding
[noxon-gateway.git] / www / index.php
index 65f6715fd26bfe6cf9f878941c714bbb9b953aeb..db6f8d8457d2d004122752066f28361497f0474a 100644 (file)
@@ -1,25 +1,5 @@
 <?php
-set_include_path(get_include_path() . PATH_SEPARATOR . __DIR__ . '/../src/');
-$fullUri = $_SERVER['REQUEST_URI'];
-if (isset($_SERVER['REDIRECT_URL'])) {
-    $path    = $_SERVER['REDIRECT_URL'];
-} else {
-    $path = '/';
-}
-$dataDir = __DIR__ . '/../data/';
-$varDir  = realpath(__DIR__ . '/../var') . '/';
-$cacheDir = __DIR__ . '/../www/cache/';
-$host1 = 'http://radio567.vtuner.com/';
-$host2 = 'http://radio5672.vtuner.com/';
-if ($_SERVER['HTTP_HOST'] !== '') {
-    $host1 = 'http://' . $_SERVER['HTTP_HOST'] . '/';
-    $host2 = 'http://' . $_SERVER['HTTP_HOST'] . '/';
-}
-$cacheDirUrl = $host1 . 'cache/';
-$cfgFile = $dataDir . 'config.php';
-if (file_exists($cfgFile)) {
-    include $cfgFile;
-}
+require_once __DIR__ . '/../src/header.php';
 
 if (strtolower($fullUri) == '/setupapp/radio567/asp/browsexpa/loginxml.asp?token=0'
     || $fullUri == '/RadioNativeLogin.php'
@@ -43,10 +23,6 @@ if (strtolower($fullUri) == '/setupapp/radio567/asp/browsexpa/loginxml.asp?token
 } else if ($path == '/RadioNativeFavorites.php') {
     //Favorites, defined via web interface
     sendMessage('Unsupported');
-} else if ($path == '/transcode') {
-    require_once 'mediatomb.php';
-    transcodeMediatombItem($_GET['mtParentId'], $_GET['mtItemTitle']);
-    exit();
 }
 
 handleRequest(ltrim($path, '/'));