summaryrefslogtreecommitdiffstats
path: root/song.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2006-01-14 19:16:00 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2006-01-14 19:16:00 +0000
commitfdb23e3779207c9a77e15c6d31441cc6314354f0 (patch)
treeef6c9e0917b59ec0faf07d652fdef0175ddfbd92 /song.php
parentc22b5025d3e77325923937f293c30d85111f5af9 (diff)
downloadampache-fdb23e3779207c9a77e15c6d31441cc6314354f0.tar.gz
ampache-fdb23e3779207c9a77e15c6d31441cc6314354f0.tar.bz2
ampache-fdb23e3779207c9a77e15c6d31441cc6314354f0.zip
fixed play selected always playing everything on a playlist regardless
Diffstat (limited to 'song.php')
-rw-r--r--song.php15
1 files changed, 2 insertions, 13 deletions
diff --git a/song.php b/song.php
index 6e8c02cf..0a446010 100644
--- a/song.php
+++ b/song.php
@@ -43,7 +43,6 @@ $song_ids = array();
$web_path = conf('web_path');
$action = scrub_in($_REQUEST['action']);
-
switch ($action) {
case 'play_selected':
$type = scrub_in($_REQUEST['type']);
@@ -52,7 +51,7 @@ switch ($action) {
}
elseif ($_REQUEST['playlist_id']) {
$playlist = new Playlist($_REQUEST['playlist_id']);
- $song_ids = $playlist->get_songs();
+ $song_ids = $playlist->get_songs($_REQUEST['song']);
}
else {
$song_ids = $_POST['song'];
@@ -71,7 +70,7 @@ switch ($action) {
break;
case 'playlist':
$playlist = new Playlist($_REQUEST['playlist_id']);
- $song_ids = $playlist->get_songs();
+ $song_ids = $playlist->get_songs($_REQUEST['song']);
$_REQUEST['action'] = 'm3u';
case 'playlist_random':
$playlist = new Playlist($_REQUEST['playlist_id']);
@@ -85,16 +84,6 @@ switch ($action) {
if ($_REQUEST['album']) {
$song_ids = get_song_ids_from_album( $_REQUEST['album'] );
}
-elseif ( $_REQUEST['playlist_id'] AND $action != 'play_selected') {
- $playlist = new Playlist($_REQUEST['playlist_id']);
- if ($_REQUEST['action'] == "random") {
- $song_ids = $playlist->get_random_songs();
- $_REQUEST['action'] = "m3u";
- }
- else {
- $song_ids = $playlist->get_songs();
- }
-}
elseif ( $_REQUEST['artist'] ) {
$artist = new Artist($_REQUEST['artist']);
$song_ids = $artist->get_song_ids();