summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-12-05 20:53:41 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-12-05 20:53:41 +0000
commitf7cfd87117fbd41911bb6823aec8ea3ffdd72350 (patch)
tree846ae867a116347abe5c0a1a3183c31169df73f6
parent52d3da75d2c8624191d484899846af00d3689634 (diff)
downloadampache-f7cfd87117fbd41911bb6823aec8ea3ffdd72350.tar.gz
ampache-f7cfd87117fbd41911bb6823aec8ea3ffdd72350.tar.bz2
ampache-f7cfd87117fbd41911bb6823aec8ea3ffdd72350.zip
fixed problem with invalid urls being sent to mpd in some cases
-rwxr-xr-xdocs/CHANGELOG2
-rw-r--r--lib/class/stream.class.php19
2 files changed, 10 insertions, 11 deletions
diff --git a/docs/CHANGELOG b/docs/CHANGELOG
index d94002ec..c0ae3b74 100755
--- a/docs/CHANGELOG
+++ b/docs/CHANGELOG
@@ -4,6 +4,8 @@
--------------------------------------------------------------------------
v.3.4-Alpha4
+ - Fixed problem with invalid urls populated to localplay methods
+ under certin conditions
- Fixed Album Art dump bin script
- Added paging to the Playlist Song view
- Fixed error on catalog Update All
diff --git a/lib/class/stream.class.php b/lib/class/stream.class.php
index 3b5d24cb..faadd2b2 100644
--- a/lib/class/stream.class.php
+++ b/lib/class/stream.class.php
@@ -451,17 +451,14 @@ class Stream {
//HACK!!!
// Yea.. you know the baby jesus... he's crying right meow
foreach ($this->songs as $song_id) {
- $this->objects[] = new Song($song_id);
- }
-
-
- // Foreach the stuff we've got and add it
- foreach ($this->objects as $object) {
- $localplay->add($object);
- }
-
- foreach ($this->urls as $url) {
- $localplay->add($url);
+ if ($song_id > 0) {
+ $song = new Song($song_id);
+ $localplay->add($song);
+ }
+ else {
+ $url = array_shift($this->urls);
+ $localplay->add($url);
+ }
}
$localplay->play();