summaryrefslogtreecommitdiffstats
path: root/modules/localplay/httpq.controller.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2006-12-22 23:15:23 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2006-12-22 23:15:23 +0000
commitfc45fa0230e54512edab6e0d7047a1708890d198 (patch)
tree0c65a27bf38530e8c2e748535208c7de049224fd /modules/localplay/httpq.controller.php
parent2f2aff930ae0b590d0460e783ec090114b15f04f (diff)
downloadampache-fc45fa0230e54512edab6e0d7047a1708890d198.tar.gz
ampache-fc45fa0230e54512edab6e0d7047a1708890d198.tar.bz2
ampache-fc45fa0230e54512edab6e0d7047a1708890d198.zip
few more fixes to the httpq player... has some strange semi-random issue with some urls.. investigating
Diffstat (limited to 'modules/localplay/httpq.controller.php')
-rw-r--r--modules/localplay/httpq.controller.php20
1 files changed, 10 insertions, 10 deletions
diff --git a/modules/localplay/httpq.controller.php b/modules/localplay/httpq.controller.php
index 57b9d5af..a3f69665 100644
--- a/modules/localplay/httpq.controller.php
+++ b/modules/localplay/httpq.controller.php
@@ -115,7 +115,7 @@ class AmpacheHttpq {
$song = new Song($song_id);
$url = $song->get_url(0,1);
if (is_null($this->_httpq->add($song->title,$url))) {
- debug_event('httpq_add','Error: Unable to add $url to Httpq','1');
+ debug_event('httpq_add',"Error: Unable to add $url to Httpq",'1');
}
} // end foreach
@@ -132,7 +132,7 @@ class AmpacheHttpq {
foreach ($urls as $url) {
if (is_null($this->_httpq->add('URL',$url))) {
- debug_event('httpq_add','Error: Unable to add $url to Httpq ','1');
+ debug_event('httpq_add',"Error: Unable to add $url to Httpq ",'1');
}
} // end foreach
@@ -323,28 +323,28 @@ class AmpacheHttpq {
/* Get the Current Playlist */
$list = $this->_httpq->get_tracks();
- $songs = explode(":",$list);
+ $songs = explode("::",$list);
- foreach ($songs as $key=>$song) {
+ foreach ($songs as $key=>$entry) {
$data = array();
-
+
/* Required Elements */
$data['id'] = $key;
- $data['raw'] = $entry['file'];
+ $data['raw'] = $entry;
/* Parse out the song ID and then create the song object */
- preg_match("/song=(\d+)\&/",$entry['file'],$matches);
+ preg_match("/song=(\d+)\&/",$entry,$matches);
/* Attempt to build the new song */
$song = new Song($matches['1']);
/* If we don't know it, look up by filename */
if (!$song->title) {
- $filename = sql_escape($entry['file']);
+ $filename = sql_escape($entry);
$sql = "SELECT id FROM song WHERE file = '$filename'";
$db_results = mysql_query($sql, dbh());
- if ($results = mysql_fetch_assoc($db_results)) {
- $song = new Song($results['id']);
+ if ($r = mysql_fetch_assoc($db_results)) {
+ $song = new Song($r['id']);
}
else {
$song->title = _('Unknown');