New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple destination paths #162

Closed
hugbug opened this Issue Jan 29, 2016 · 1 comment

Comments

Projects
None yet
1 participant
@hugbug
Member

hugbug commented Jan 29, 2016

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.

Proposed feature

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.

@hugbug hugbug added the feature label Jan 29, 2016

@hugbug hugbug added this to the v17.0 milestone Jan 29, 2016

hugbug added a commit that referenced this issue Jan 30, 2016

#162: multiple destination paths for categories
in option “CategoryX.DestDir”.

hugbug added a commit that referenced this issue Jan 31, 2016

hugbug added a commit that referenced this issue Jan 31, 2016

#162: combining free space on all paths of "DestDir"
1) When checking free space (option “DiskSpace”) the total free size of
directories in “DestDir” is checked;
2) Web-interface shows the total free size of all directories.

hugbug added a commit that referenced this issue Feb 1, 2016

hugbug added a commit that referenced this issue Feb 1, 2016

@hugbug hugbug closed this Feb 1, 2016

hugbug added a commit that referenced this issue Feb 2, 2016

#162: removed support for multiple paths
in options “DestDir” and “CategoryX.DestDir”.

hugbug added a commit that referenced this issue Feb 2, 2016

#162: change destination directory from queue-script
Queue-scripts can now change destination after download is completed
and before unpack.
@hugbug

This comment has been minimized.

Show comment
Hide comment
@hugbug

hugbug Feb 2, 2016

Member

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.

Member

hugbug commented Feb 2, 2016

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.

hugbug added a commit that referenced this issue Mar 24, 2016

#162: fixed: unpack destination path were not correct
if multiple unpack attempts were needed.

hugbug added a commit that referenced this issue Jul 30, 2016

hugbug added a commit that referenced this issue Oct 9, 2017

#162: fixed: unpack destination path were not correct
if multiple unpack attempts were needed.

hugbug added a commit that referenced this issue Oct 9, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment