Fix URL encoding in mediatomb
authorChristian Weiske <cweiske@cweiske.de>
Wed, 25 Nov 2015 22:51:06 +0000 (23:51 +0100)
committerChristian Weiske <cweiske@cweiske.de>
Wed, 25 Nov 2015 22:51:06 +0000 (23:51 +0100)
src/mediatomb.php

index 74b7f8479fdaa5d07f16cdf1ae621b8840355a72..e8bbfcb9d9c97b26c8b55d47125df186f1390f6a 100644 (file)
@@ -9,7 +9,7 @@ function handleRequestMediatomb($fullPath, $prefix)
     try {
         $smt = new Services_MediaTomb($user, $pass, $host, $port);
 
-        $path = substr(urldecode($fullPath), strlen($prefix));
+        $path = substr($fullPath, strlen($prefix));
         $container = $smt->getContainerByPath($path);
         $listItems = array();
         addPreviousItem($listItems, $fullPath);
@@ -17,7 +17,7 @@ function handleRequestMediatomb($fullPath, $prefix)
         foreach ($container->getContainers() as $subContainer) {
             $listItems[] = getDirItem(
                 $subContainer->title,
-                $fullPath . rawurlencode($subContainer->title) . '/'
+                pathEncode($fullPath . $subContainer->title) . '/'
             );
         }