Multiple destination paths #162
For systems having multiple drives which are not combined into one logical drive it would be helpful if NZBGet could allow specifying more than one destination path whereas the program would choose one of the paths on its own.
Media library tools such as Plex already can manage multiple drives transparently and for uses it doesn't matter on which drive the files are stored.
Currently NZBGet can download to one drive and users have to manually transfer files to other drive(s) to make space on the drive used as download destination. If NZBGet could choose the destination drive automatically that would eliminate the manual copy work.
Allow option CategoryX.DestDir to specify multiple paths separated with comma or semicolon. When writing files NZBGet should check the free space on all drives and choose the drive with maximum free space.
A similar possibility for global option DestDir make sense too but is less critical.
Tests did show that the automatic choosing of destination path based on free space wasn't very practical producing very fragmented distribution of downloaded episodes across all disks. More sophisticated strategies are desired here.
Such strategies should be implemented as extension scripts. To support this the handling of queue-script were extended to allow setting of destination directory in event NZB_DOWNLOADED which is executed after all files are downloaded and before the files are unpacked (or moved to destination if unpack is disabled). A simple example:
### NZBGET QUEUE SCRIPT if os.environ.get('NZBNA_EVENT') == 'NZB_DOWNLOADED': nzb_name = os.environ['NZBNA_NZBNAME'] dest_dir = '/Volumes/Storage/Usenet-Downloads/via-script/%s' % nzb_name print('[INFO] Setting destination directory to %s' % dest_dir) print('[NZB] DIRECTORY=%s' % dest_dir)
One possibility of better handling of multiple drives would be to extend VideoSort so that it would act as queue script setting destination directory before unpack. Since VideoSort knows where the files go after unpack it could choose the best path for each downloaded episode to keep all episodes of one show on the same drive.
The ability of setting multiple paths via options DestDir and CategoryX.DestDir was removed from the core program.