clinton-hall / nzbToMedia

Provides NZB and Torrent postprocessing To CouchPotatoServer, SickBeard/SickRage, HeadPhones, Mylar and Gamez
GNU General Public License v3.0
671 stars 176 forks source link

keep_archive = 1/2 (Confirmation of usage? #1849

Closed neo-neo1 closed 3 years ago

neo-neo1 commented 3 years ago

I read through the entire Wiki and didn't see the "keep_archive" switch mentioned, I will update the wiki with appropriate information with your help. Do I understanding it correctly that this option is in regards to deleting the original compressed file which is downloaded AFTER it is extracted?

Just to confirm? 1 = deletes archive 0 = does NOT delete

Also, if I set delete_on=1 it will overrule the "keep_archive" setting, correct?

clinton-hall commented 3 years ago

That is correct. keep_archive functions as follows:

Note. these only apply to Torrent Downloads. any NZBs (if not already extracted) will delete these by default).

delete_on will have SickChill/Medusa etc. delete all left-over files in the directory that is passed to it... so if you have the torrent outputDirectory set to a different location to where the original torrents are downloaded to, then delete_on will only remove excess files from outputDirectory. this won't over-ride the keep_archive. If however outputDirectory is the same as your download directory, then yes, delete_on would over-ride keep_archive as Sick* will remove the archive files after renaming the media.

Also, under Torrent there is a deleteOriginal option. when set to 1, this will delete the original torrent (and all original files) from your downloader AFTER the media files have been renamed/moved.

Finally, there is also an option force_clean. If this is set, then a clean-up process at the end will also remove all remaining files in the original download location (NZBs) or the output_destination (Torrents)

So the ORDER of events are:

Torrent:

  1. Extracts to outputDirectory
  2. Remove archive files from Download directory (keep_archive = 0)
  3. Send outputDirectory to Media Manager (SickChill etc.)
  4. Media Manager renames files and removes excess files (in outputDirectory) based on default setting (if delete_on = 1, then all excess files are deleted)
  5. Torrent is resumed for seeding, or deleted (if deleteOriginal = 1 or Use_Link = Move)
  6. All files left in output_destination are removed if force_clean = 1

NZB:

  1. Extracts to archives if No media files found and archives exist.
  2. Remove archive files from Download directory
  3. Send outputDirectory to Media Manager (SickChill etc.)
  4. Media Manager renames files and removes excess files based on default setting (if delete_on = 1, then all excess files are deleted)
  5. All files left in the download directory are removed if force_clean = 1