summaryrefslogtreecommitdiffstats
path: root/templates
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
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')
-rw-r--r--templates/rightbar.inc.php11
-rw-r--r--templates/show_song.inc.php2
-rw-r--r--templates/show_song_row.inc.php2
3 files changed, 6 insertions, 9 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; ?>
diff --git a/templates/show_song.inc.php b/templates/show_song.inc.php
index 45f8c90c..000e1581 100644
--- a/templates/show_song.inc.php
+++ b/templates/show_song.inc.php
@@ -28,7 +28,7 @@ $button_flip_state_id = 'button_flip_state_' . $song->id;
<dd class"<?php echo $rowparity; ?>">
<?php echo Ajax::button('?action=basket&type=song&id=' . $song->id,'add',_('Add'),'add_song_' . $song->id); ?>
<?php if (Access::check_function('download')) { ?>
- <a href="<?php echo $song->get_url(); ?>"><?php echo get_user_icon('link'); ?></a>
+ <a href="<?php echo Song::play_url($song->id); ?>"><?php echo get_user_icon('link'); ?></a>
<a href="<?php echo Config::get('web_path'); ?>/stream.php?action=download&amp;song_id=<?php echo $song->id; ?>"><?php echo get_user_icon('download'); ?></a>
<?php } ?>
<?php if (Access::check('interface','75')) { ?>
diff --git a/templates/show_song_row.inc.php b/templates/show_song_row.inc.php
index 926940c0..55b99ff3 100644
--- a/templates/show_song_row.inc.php
+++ b/templates/show_song_row.inc.php
@@ -22,7 +22,7 @@
<td class="cel_add">
<?php echo Ajax::button('?action=basket&type=song&id=' . $song->id,'add',_('Add'),'add_' . $song->id); ?>
</td>
-<td class="cel_song"><a href="<?php echo $song->get_url(); ?>"><?php echo $song->f_title; ?></a></td>
+<td class="cel_song"><a href="<?php echo Song::play_url($song->id); ?>"><?php echo $song->f_title; ?></a></td>
<td class="cel_artist"><?php echo $song->f_artist_link; ?></td>
<td class="cel_album"><?php echo $song->f_album_link; ?></td>
<td class="cel_tags"><?php echo $song->f_tags; ?></td>