summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/class/stream.class.php19
1 files changed, 8 insertions, 11 deletions
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();