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 1720268a06edc9338e2f3efca93ccb31d44afea3..3294c49882eb91a6ad88519d8180f3e08d74fb8d 100644 (file)
@@ -20,7 +20,5 @@ $clientSupport = [
 ];
 
 //if this is set, transcode caching is activated
 ];
 
 //if this is set, transcode caching is activated
-$cacheDir = null;
-//http-accessible cache dir URL
-$cacheDirUrl = null;
+$enableCache = false;
 ?>
 ?>
index 33b9bd87305fbeedf076e65d341c4a3cbd72223e..ffc123a38f621624e365733fee172be5b8813132 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 (!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 {
             $itemUrl = $host1 . 'transcode-cache.php'
                 . '?url=' . urlencode($itemUrl);
         } else {