summaryrefslogtreecommitdiffstats
path: root/random.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-11-05 02:52:57 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-11-05 02:52:57 +0000
commitab0e89b8dd232cca8b583f515a5ddf22c24cf9f9 (patch)
tree3df4b9637add2bdde716c0a442e518d4e1af2688 /random.php
parentd3840c7de09f2b8d4e06ba91d94459d9baccee4e (diff)
downloadampache-ab0e89b8dd232cca8b583f515a5ddf22c24cf9f9.tar.gz
ampache-ab0e89b8dd232cca8b583f515a5ddf22c24cf9f9.tar.bz2
ampache-ab0e89b8dd232cca8b583f515a5ddf22c24cf9f9.zip
fixed multi-genre random play
Diffstat (limited to 'random.php')
-rw-r--r--random.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/random.php b/random.php
index 3fb38eca..237f7c03 100644
--- a/random.php
+++ b/random.php
@@ -25,8 +25,17 @@ require_once 'lib/init.php';
show_header();
switch ($_REQUEST['action']) {
- default:
+ case 'get_advanced':
+ $object_ids = Random::advanced($_POST);
+
+ // We need to add them to the active playlist
+ foreach ($object_ids as $object_id) {
+ $GLOBALS['user']->playlist->add_object($object_id,'song');
+ }
+ // We need to refresh the playlist
+
case 'advanced':
+ default:
require_once Config::get('prefix') . '/templates/show_random.inc.php';
break;
} // end switch