diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2005-08-03 05:46:33 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2005-08-03 05:46:33 +0000 |
commit | 7899c3488f4288c8618d73c8ea0ef8e5e07f9ae5 (patch) | |
tree | 64be964b83e9990aa110ce55bd27da3112622bf1 /batch.php | |
parent | f5fd6eb89a6416a65bf088c922d7566113509a7c (diff) | |
download | ampache-7899c3488f4288c8618d73c8ea0ef8e5e07f9ae5.tar.gz ampache-7899c3488f4288c8618d73c8ea0ef8e5e07f9ae5.tar.bz2 ampache-7899c3488f4288c8618d73c8ea0ef8e5e07f9ae5.zip |
added download selected button
Diffstat (limited to 'batch.php')
-rw-r--r-- | batch.php | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -39,8 +39,21 @@ set_time_limit(0); - if( batch_ok( ) ) { + if(batch_ok()) { switch( scrub_in( $_REQUEST['action'] ) ) { + case 'download_selected': + $type = scrub_in($_REQUEST['type']); + if ($type == 'album') { + $song_ids = get_songs_from_type($type,$_POST['song'],$_REQUEST['artist_id']); + } + else { + $song_ids = $_POST['song']; + } + $name = "selected-" . date("m-d-Y",time()); + $song_files = get_song_files($song_ids); + set_memory_limit($song_files[1]+16); + send_zip($name,$song_files[0]); + break; case "pl": $id = scrub_in( $_REQUEST['id'] ); $pl = new Playlist( $id ); |