summaryrefslogtreecommitdiffstats
path: root/templates/rightbar.inc.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2009-02-28 18:13:48 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2009-02-28 18:13:48 +0000
commitdbdd96ed1b3b00a850be001f3dbeea3273739a98 (patch)
treeccd23afffb6a4c2dc185bd6ffc39e13435fc1179 /templates/rightbar.inc.php
parent3a3e0c6a9f72d5031a4025dedcf2360c497c4953 (diff)
downloadampache-dbdd96ed1b3b00a850be001f3dbeea3273739a98.tar.gz
ampache-dbdd96ed1b3b00a850be001f3dbeea3273739a98.tar.bz2
ampache-dbdd96ed1b3b00a850be001f3dbeea3273739a98.zip
unify how the stream is constructed and played, this is a major change might be some regressions
Diffstat (limited to 'templates/rightbar.inc.php')
-rw-r--r--templates/rightbar.inc.php11
1 files changed, 4 insertions, 7 deletions
diff --git a/templates/rightbar.inc.php b/templates/rightbar.inc.php
index 990d4f20..01a6aa10 100644
--- a/templates/rightbar.inc.php
+++ b/templates/rightbar.inc.php
@@ -88,17 +88,14 @@
$objects = array_slice($objects,0,100);
}
- $normal_array = array('radio','song','video');
+ $normal_array = array('radio','song','video','random');
foreach ($objects as $uid=>$object_data) {
- if (in_array($object_data['1'],$normal_array)) {
- $object = new $object_data['1']($object_data['0']);
+ $type = array_shift($object_data);
+ if (in_array($type,$normal_array)) {
+ $object = new $type(array_shift($object_data));
$object->format();
}
- else {
- $object = new Random();
- $object->f_link = Random::get_type_name($object_data['1']);
- }
?>
<li class="<?php echo flip_class(); ?>" >
<?php echo $object->f_link; ?>