summaryrefslogtreecommitdiffstats
path: root/batch.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2005-08-03 05:46:33 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2005-08-03 05:46:33 +0000
commit7899c3488f4288c8618d73c8ea0ef8e5e07f9ae5 (patch)
tree64be964b83e9990aa110ce55bd27da3112622bf1 /batch.php
parentf5fd6eb89a6416a65bf088c922d7566113509a7c (diff)
downloadampache-7899c3488f4288c8618d73c8ea0ef8e5e07f9ae5.tar.gz
ampache-7899c3488f4288c8618d73c8ea0ef8e5e07f9ae5.tar.bz2
ampache-7899c3488f4288c8618d73c8ea0ef8e5e07f9ae5.zip
added download selected button
Diffstat (limited to 'batch.php')
-rw-r--r--batch.php15
1 files changed, 14 insertions, 1 deletions
diff --git a/batch.php b/batch.php
index 752176c9..80f162f5 100644
--- a/batch.php
+++ b/batch.php
@@ -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 );