Use a dedicated variable to enable transcode caching
authorChristian Weiske <cweiske@cweiske.de>
Tue, 19 Dec 2017 20:44:05 +0000 (21:44 +0100)
committerChristian Weiske <cweiske@cweiske.de>
Tue, 19 Dec 2017 20:44:05 +0000 (21:44 +0100)
data/config.php.dist
src/mediatomb.php

index 1720268..3294c49 100644 (file)
@@ -20,7 +20,5 @@ $clientSupport = [
 ];
 
 //if this is set, transcode caching is activated
-$cacheDir = null;
-//http-accessible cache dir URL
-$cacheDirUrl = null;
+$enableCache = false;
 ?>
index 33b9bd8..ffc123a 100644 (file)
@@ -73,7 +73,7 @@ function mediatombAddFile(&$listItems, $item)
     if (!clientSupportsType($di->mimetype)) {
         //client wants transcoded file
         //noxon iRadio cube does not want to play .ogg files
-        if (isset($GLOBALS['cacheDir']) && $GLOBALS['cacheDir'] != '') {
+        if (isset($GLOBALS['enableCache']) && $GLOBALS['enableCache']) {
             $itemUrl = $host1 . 'transcode-cache.php'
                 . '?url=' . urlencode($itemUrl);
         } else {