mirror of
https://github.com/Yetangitu/ampache
synced 2025-10-05 10:49:37 +02:00
renamed xml-rpc acl to rpc, added default mime type of image/jpg and added config options for batch download to the fs, no garbage collection for non-completed downloads yet.
This commit is contained in:
parent
d5ae71f551
commit
67cbb218cd
10 changed files with 177 additions and 34 deletions
|
@ -50,11 +50,27 @@ function get_song_files($song_ids) {
|
|||
*/
|
||||
function send_zip( $name, $song_files ) {
|
||||
|
||||
// Check if they want to save it to a file, if so then make sure they've got
|
||||
// a defined path as well and that it's writeable
|
||||
if (Config::get('file_zip_download') && Config::get('file_zip_path')) {
|
||||
// Check writeable
|
||||
if (!is_writable(Config::get('file_zip_path'))) {
|
||||
$in_memory = '1';
|
||||
debug_event('Error','File Zip Path:' . Config::get('file_zip_path') . ' is not writeable','1');
|
||||
}
|
||||
else {
|
||||
$in_memory = '0';
|
||||
$basedir = Config::get('file_zip_path');
|
||||
}
|
||||
|
||||
} // if file downloads
|
||||
|
||||
/* Require needed library */
|
||||
require_once Config::get('prefix') . '/modules/archive/archive.lib.php';
|
||||
$arc = new zip_file( $name . ".zip" );
|
||||
$options = array(
|
||||
'inmemory' => 1, // create archive in memory
|
||||
'inmemory' => $in_memory, // create archive in memory
|
||||
'basedir' => $basedir,
|
||||
'storepaths' => 0, // only store file name, not full path
|
||||
'level' => 0 // no compression
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue