I am wondering if there is a functional tar, or zip facsimile in linux (RHEL/CentOS) to using "7za a -tzip -mx0 -- %destination @%list" to utilize the download album function.
Yes, I am aware that simply installing p7zip would simplify this process, however, p7zip will not be an option for the server I am implementing this for.
Thank you,
Chris
Tar or Zip support for download album
- wbartels
- netjukebox developer
- Posts: 881
- Joined: Thu Nov 04, 2004 3:12 pm
- Location: Netherlands
- Contact:
Re: Tar or Zip support for download album
I have found a working zip solution on Ubuntu.
This should also work on RHEL/CentOS.
Please do some intensive testing and let me know if it also works for you?
If there are no problems I will add both config setting to the upcoming netjukebox with something like:
This should also work on RHEL/CentOS.
Code: Select all
$cfg['download_album_cmd'] = 'cat %list' . ' | ' . $cfg['bin_dir'] . 'zip --junk-paths -0 %destination -@';
If there are no problems I will add both config setting to the upcoming netjukebox with something like:
Code: Select all
// +------------------------------------------------------------------------+
// | Download album (with 7-Zip or zip) |
// +------------------------------------------------------------------------+
// | http://www.7-zip.org |
// | |
// | 7za uses the LANG envirement variabale, normaly this is only set when |
// | PHP is running in CLI mode. |
// +------------------------------------------------------------------------+
// | http://www.info-zip.org/ |
// | |
// | For zip the LANG envirement variabale is not needed. |
// | And can be set to an empty string: |
// | $cfg['download_album_env_lang'] = ''; |
// +------------------------------------------------------------------------+
$cfg['download_album_mime_type'] = 'application/zip';
$cfg['download_album_env_lang'] = 'en_US.UTF-8';
$cfg['download_album_extension'] = 'zip';
$cfg['download_album_cmd'] = $cfg['bin_dir'] . '7za a -tzip -mx0 -- %destination @%list';
// $cfg['download_album_cmd'] = 'cat %list' . ' | ' . $cfg['bin_dir'] . 'zip --junk-paths -0 %destination -@';
Re: Tar or Zip support for download album
This works perfectly! I also tested it using a .tar format, and the results are extremely fast for archiving.
Thank you,
Chris
Thank you,
Chris
- wbartels
- netjukebox developer
- Posts: 881
- Joined: Thu Nov 04, 2004 3:12 pm
- Location: Netherlands
- Contact:
Re: Tar or Zip support for download album
Thanks for the feedback!ix6tech wrote:This works perfectly! I also tested it using a .tar format, and the results are extremely fast for archiving.
Thank you,
Chris
With the settings below it creates a tar file.
However it also add the complete directory structure.
I'm now looking for a command similar to --junk-paths from zip.
Code: Select all
$cfg['download_album_mime_type'] = 'application/x-tar';
$cfg['download_album_env_lang'] = '';
$cfg['download_album_extension'] = 'tar';
$cfg['download_album_cmd'] = 'tar --create --file %destination --files-from %list';
- wbartels
- netjukebox developer
- Posts: 881
- Joined: Thu Nov 04, 2004 3:12 pm
- Location: Netherlands
- Contact:
Re: Tar or Zip support for download album
I have changed the netjukebox code so that it will first change the to the cache directory.
And create a list file with relative file names.
This way --junk-paths or the tar counterpart is not needed anymore.
And create a list file with relative file names.
This way --junk-paths or the tar counterpart is not needed anymore.
Re: Tar or Zip support for download album
Excellent. This should make switching archive methods easier.
- wbartels
- netjukebox developer
- Posts: 881
- Joined: Thu Nov 04, 2004 3:12 pm
- Location: Netherlands
- Contact:
Re: Tar or Zip support for download album
Sorry this modification doesn't work for source files (without transcoding).wbartels wrote:I have changed the netjukebox code so that it will first change the to the cache directory.
And create a list file with relative file names.
This way --junk-paths or the tar counterpart is not needed anymore.
So I have to revert the code.
7-Zip and zip (with --junk-paths) can still be used.