From 1e760a31e2856fd1af842c206d0a567a3b6a3073 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Wed, 25 Nov 2015 23:51:06 +0100 Subject: [PATCH 1/1] Fix URL encoding in mediatomb --- src/mediatomb.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mediatomb.php b/src/mediatomb.php index 74b7f84..e8bbfcb 100644 --- a/src/mediatomb.php +++ b/src/mediatomb.php @@ -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) . '/' ); } -- 2.30.2