X-Git-Url: https://git.cweiske.de/noxon-gateway.git/blobdiff_plain/35f7eecda65c8a321e9f437ecae233e63aaf060b..49f9d0097f92966d8d09cb8eb05708425ea3e5ab:/src/mediatomb.php diff --git a/src/mediatomb.php b/src/mediatomb.php index 96be27c..ffc123a 100644 --- a/src/mediatomb.php +++ b/src/mediatomb.php @@ -25,6 +25,11 @@ function mediatombBrowse(Services_MediaTomb $smt, $fullPath, $prefix) $path = substr($fullPath, strlen($prefix)); $container = $smt->getContainerByPath($path); + if ($container === null) { + sendMessage('Error accessing ' . $fullPath); + return; + } + $listItems = array(); $it = $container->getItemIterator(false); @@ -68,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 {