diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2005-08-18 16:49:50 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2005-08-18 16:49:50 +0000 |
commit | ebd39247d9e7a4eda49ac3410197de1e1a2f2457 (patch) | |
tree | 8cd483816d3fa8d514bc63e618e2073be132365f /lib/batch.lib.php | |
parent | ccf03a68e2584835fb4d6fe3a6bc2e2cc780ce8c (diff) | |
download | ampache-ebd39247d9e7a4eda49ac3410197de1e1a2f2457.tar.gz ampache-ebd39247d9e7a4eda49ac3410197de1e1a2f2457.tar.bz2 ampache-ebd39247d9e7a4eda49ac3410197de1e1a2f2457.zip |
few mpd style tweaks, new archive lib and a new print_tags
Diffstat (limited to 'lib/batch.lib.php')
-rw-r--r-- | lib/batch.lib.php | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/lib/batch.lib.php b/lib/batch.lib.php index 3d22a72f..5cb8494f 100644 --- a/lib/batch.lib.php +++ b/lib/batch.lib.php @@ -57,10 +57,23 @@ function send_zip( $name, $song_files ) { 'storepaths' => 0, // only store file name, not full path 'level' => 0 // no compression ); + $arc->set_options( $options ); $arc->add_files( $song_files ); - $arc->create_archive(); - $arc->download_file(); + if (count($arc->error)) { + if (conf('debug')) { + log_event($GLOBALS['user']->username,'archive',"Error: unable to add songs"); + + } + } // if failed to add songs + if (!$arc->create_archive()) { + if (conf('debug')) { + log_event($GLOBALS['user']->username,'archive',"Error: unable to create archive"); + } + } // if failed to create archive + + $arc->download_file(); + } // send_zip ?> |