From 35e6419688e993a868b6cf7849cd9ff8ec41e75c Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Wed, 25 Nov 2015 01:26:03 +0100 Subject: [PATCH] url-encode paths --- src/mediatomb.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mediatomb.php b/src/mediatomb.php index 16b0ced..40861ae 100644 --- a/src/mediatomb.php +++ b/src/mediatomb.php @@ -8,7 +8,7 @@ function handleRequestMediatomb($fullPath, $prefix) extract($mediatomb); $smt = new Services_MediaTomb($user, $pass, $host, $port); - $path = substr($fullPath, strlen($prefix)); + $path = substr(urldecode($fullPath), strlen($prefix)); $container = $smt->getContainerByPath($path); $listItems = array(); addPreviousItem($listItems, $fullPath); @@ -16,7 +16,7 @@ function handleRequestMediatomb($fullPath, $prefix) foreach ($container->getContainers() as $subContainer) { $listItems[] = getDirItem( $subContainer->title, - $fullPath . $subContainer->title . '/' + $fullPath . urlencode($subContainer->title) . '/' ); } -- 2.30.2