escape spaces in folders
[ouya-imagestore.git] / src / imagestore / Controller / Api / Playlists.php
index ea9d332e10b3d44d38f0a0bad3bb9ea1c9c1efbc..d35d7860ab12c61fb5eebaca321f144a6b224774 100644 (file)
@@ -39,11 +39,13 @@ class Controller_Api_Playlists extends Controller_Api_ImageBase
 
             foreach ($arDirs as $dirInfo) {
                 $uuid = str_replace(
-                    '/', '-.-', $this->getRelPath($dirInfo->getPathname())
+                    array('/', ' '), array('-.-', '+'),
+                    $this->getRelPath($dirInfo->getPathname())
                 );
                 $playlists->games[] = (object) array(
                     'content_rating' => 'Everyone', 
-                    'image'   => $this->getImageUrl($this->getFirstImage($dirInfo)),
+                    'image'   => $this->getImageUrl($this->getFirstImage($dirInfo))
+                        . '&w=400',
                     'title'   => basename($dirInfo->getPathname()), 
                     'uuid'    =>  $uuid,
                     'version' => '11111111-0000-1111-0000-111111111111',