diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-07-24 04:10:58 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-07-24 04:10:58 +0000 |
commit | a74d0b7163c8755e23598997c364bc75a18f943e (patch) | |
tree | c1ad6ca02907d18b78542e79e557e93901afadf7 /play/index.php | |
parent | 0f9c1f245c35e533171cda4b433718f24ca8a707 (diff) | |
download | ampache-a74d0b7163c8755e23598997c364bc75a18f943e.tar.gz ampache-a74d0b7163c8755e23598997c364bc75a18f943e.tar.bz2 ampache-a74d0b7163c8755e23598997c364bc75a18f943e.zip |
added dynamic playlist item support, default and genre currently work
Diffstat (limited to 'play/index.php')
-rw-r--r-- | play/index.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/play/index.php b/play/index.php index 7520fc5a..65cdf8e4 100644 --- a/play/index.php +++ b/play/index.php @@ -37,9 +37,10 @@ $sid = scrub_in($_REQUEST['sid']); /* This is specifically for tmp playlist requests */ $tmp_id = scrub_in($_REQUEST['tmp_id']); +$random = scrub_in($_REQUEST['random']); /* First things first, if we don't have a uid/song_id stop here */ -if (empty($song_id) && empty($tmp_id)) { +if (empty($song_id) && empty($tmp_id) && empty($random)) { debug_event('no_song',"Error: No Song UID Specified, nothing to play",'2'); exit; } @@ -117,6 +118,13 @@ if ($tmp_id) { $song_id = $tmp_playlist->get_next_object(); } +/** + * if we are doing random let's pull the random object + */ +if ($random) { + $song_id = Random::get_single_song($_REQUEST['type']); +} + /* Base Checks passed create the song object */ $song = new Song($song_id); $song->format(); |