From dced24f2c5475199fd7f23de726ae2f1423e3956 Mon Sep 17 00:00:00 2001 From: Karl 'vollmerk' Vollmer Date: Thu, 11 Jan 2007 16:01:29 +0000 Subject: [PATCH] fix for the httpq player so that it works with songs that have spaces in the name --- lib/class/album.class.php | 2 +- modules/httpq/httpqplayer.class.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/class/album.class.php b/lib/class/album.class.php index 31a4f54e..67bf218e 100644 --- a/lib/class/album.class.php +++ b/lib/class/album.class.php @@ -213,7 +213,7 @@ class Album { /* If it's not set */ if (empty($config_value)) { // They don't want art! - return false; + return array(); } elseif (!is_array($config_value)) { $config_value = array($config_value); diff --git a/modules/httpq/httpqplayer.class.php b/modules/httpq/httpqplayer.class.php index dae6f29e..82685a51 100644 --- a/modules/httpq/httpqplayer.class.php +++ b/modules/httpq/httpqplayer.class.php @@ -54,8 +54,8 @@ class HttpQPlayer { */ function add($name, $url) { - $args['name'] = $name; - $args['url'] = str_replace("&","%26",$url); + $args['name'] = urlencode($name); + $args['url'] = urlencode($url); $results = $this->sendCommand('playurl', $args);