summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-12-01 19:53:34 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-12-01 19:53:34 +0000
commit06bba3740b0bb4efd11cba8386a414ad4ae1fdb6 (patch)
tree376913d116f1b3ff9e509d4c800f18107a3a8c00
parentaed7695b2124cccca87d41cdee51cbe31db44452 (diff)
downloadampache-06bba3740b0bb4efd11cba8386a414ad4ae1fdb6.tar.gz
ampache-06bba3740b0bb4efd11cba8386a414ad4ae1fdb6.tar.bz2
ampache-06bba3740b0bb4efd11cba8386a414ad4ae1fdb6.zip
fixed url add to localplay, also changed some play links to add
-rwxr-xr-xdocs/CHANGELOG1
-rw-r--r--lib/class/localplay.abstract.php6
-rw-r--r--lib/class/stream.class.php4
-rw-r--r--stream.php1
-rw-r--r--templates/show_album.inc.php4
-rw-r--r--templates/show_artist_box.inc.php4
6 files changed, 15 insertions, 5 deletions
diff --git a/docs/CHANGELOG b/docs/CHANGELOG
index 3e1c217b..557d81ae 100755
--- a/docs/CHANGELOG
+++ b/docs/CHANGELOG
@@ -4,6 +4,7 @@
--------------------------------------------------------------------------
v.3.4-Alpha4
+ - Fixed sending URLs directly to MPD
- Fixed a problem with automatic downsampling which was referencing
a now non-existant function
- Massive speed improvement on display and sorting of standard
diff --git a/lib/class/localplay.abstract.php b/lib/class/localplay.abstract.php
index 0d870b05..144c1918 100644
--- a/lib/class/localplay.abstract.php
+++ b/lib/class/localplay.abstract.php
@@ -52,6 +52,12 @@ abstract class localplay_controller {
*/
public function get_url($object) {
+ // This might not be an object!
+ if (!is_object($object)) {
+ // Stupiidly we'll just blindly add it for now
+ return $object;
+ }
+
// This can get a little complicated
switch ($object_type) {
case 'random':
diff --git a/lib/class/stream.class.php b/lib/class/stream.class.php
index 793d5a6b..cc6e9dc1 100644
--- a/lib/class/stream.class.php
+++ b/lib/class/stream.class.php
@@ -459,6 +459,10 @@ class Stream {
foreach ($this->objects as $object) {
$localplay->add($object);
}
+
+ foreach ($this->urls as $url) {
+ $localplay->add($url);
+ }
$localplay->play();
diff --git a/stream.php b/stream.php
index c48d53c6..77621b01 100644
--- a/stream.php
+++ b/stream.php
@@ -198,7 +198,6 @@ switch ($_REQUEST['method']) {
if ($GLOBALS['user']->prefs['play_type'] == 'democratic') {
$GLOBALS['user']->prefs['play_type'] = 'stream';
}
- break;
default:
$stream_type = $GLOBALS['user']->prefs['play_type'];
break;
diff --git a/templates/show_album.inc.php b/templates/show_album.inc.php
index 4f9956cd..78944dbf 100644
--- a/templates/show_album.inc.php
+++ b/templates/show_album.inc.php
@@ -42,8 +42,8 @@ $title = scrub_out($album->name) . '&nbsp;(' . $album->year . ')&nbsp;--&nbsp;'
<div id="information_actions">
<h3><?php echo _('Actions'); ?>:</h3>
<ul>
- <li><?php echo Ajax::text('?action=basket&type=album&id=' . $album->id,_('Play Album'),'play_full_' . $album->id); ?></li>
- <li><?php echo Ajax::text('?action=basket&type=album_random&id=' . $album->id,_('Play Random from Album'),'play_random_' . $album->id); ?></li>
+ <li><?php echo Ajax::text('?action=basket&type=album&id=' . $album->id,_('Add Album'),'play_full_' . $album->id); ?></li>
+ <li><?php echo Ajax::text('?action=basket&type=album_random&id=' . $album->id,_('Add Random from Album'),'play_random_' . $album->id); ?></li>
<?php if ($GLOBALS['user']->has_access('75')) { ?>
<li><a href="<?php echo $web_path; ?>/albums.php?action=clear_art&amp;album_id=<?php echo $album->id; ?>"><?php echo _('Reset Album Art'); ?></a></li>
<?php } ?>
diff --git a/templates/show_artist_box.inc.php b/templates/show_artist_box.inc.php
index 6cd025f8..48f81227 100644
--- a/templates/show_artist_box.inc.php
+++ b/templates/show_artist_box.inc.php
@@ -32,8 +32,8 @@ if (Config::get('ratings')) {
<strong><?php echo _('Actions'); ?>:</strong>
<div id="information_actions">
<a href="<?php echo $web_path; ?>/artists.php?action=show_all_songs&amp;artist=<?php echo $artist->id; ?>"><?php echo _("Show All Songs By") . " " . $artist->f_name; ?></a><br />
-<?php echo Ajax::text('?action=basket&type=artist&id=' . $artist->id,_('Play All Songs By') . ' ' . $artist->f_name,'play_full_artist'); ?><br />
-<?php echo Ajax::text('?action=basket&type=artist_random&id=' . $artist->id,_('Play Random Songs By') . ' ' . $artist->f_name,'play_random_artist'); ?><br />
+<?php echo Ajax::text('?action=basket&type=artist&id=' . $artist->id,_('Add All Songs By') . ' ' . $artist->f_name,'play_full_artist'); ?><br />
+<?php echo Ajax::text('?action=basket&type=artist_random&id=' . $artist->id,_('Add Random Songs By') . ' ' . $artist->f_name,'play_random_artist'); ?><br />
<?php if ($GLOBALS['user']->has_access('50')) { ?>
<a href="<?php echo $web_path; ?>/artists.php?action=update_from_tags&amp;artist=<?php echo $artist->id; ?>"><?php echo _("Update from tags"); ?></a><br />
<a href="<?php echo $web_path; ?>/artists.php?action=show_similar&amp;artist=<?php echo $artist->id; ?>"><?php echo _("Find duplicate artists"); ?></a><br />