Simple one: UNRAR to temp folder, THEN move

Want something added? Ask for it here.
otakucode
Newbie
Newbie
Posts: 2
Joined: February 20th, 2009, 10:02 pm

Simple one: UNRAR to temp folder, THEN move

Post by otakucode »

The way I use SABnzbd, I have it setup to place completed, processed, extracted downloads into a folder which is shared from another machine on my network.

Right now, when SABnzbd finishes downloading a post, it begins extracting the RAR archive across the network.  I would prefer the extraction to occur in the work folder (a fast drive on the server where SABnzbd runs) and have the extracted files copied to their final destination afterwards.

Thanks in advance, I love SABnzbd!
User avatar
switch
Moderator
Moderator
Posts: 1380
Joined: January 17th, 2008, 3:55 pm
Location: UK

Re: Simple one: UNRAR to temp folder, THEN move

Post by switch »

Do you have a good reason for wanting to do it this way? A reasoned feature will help convince us to make the changes.

Since it would increase post processing time (having to unrar and move rather than just unrar) I would need a litle more detail before I would make the changes myself.
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Simple one: UNRAR to temp folder, THEN move

Post by shypike »

Just place your "complete" folder on the local disk and write a simple user script to move the files.
debontehond
Newbie
Newbie
Posts: 1
Joined: April 13th, 2015, 12:13 pm

Re: Simple one: UNRAR to temp folder, THEN move

Post by debontehond »

Hi,


I cannot write any scripts but would also like to have downloads moved once unpacked due to performance improvement. Can you provide such a script for Windows?
Thanks!
jibjibjib
Newbie
Newbie
Posts: 2
Joined: May 11th, 2015, 12:15 pm

Re: Simple one: UNRAR to temp folder, THEN move

Post by jibjibjib »

I don't get this either. If you are making a distinction between Completed and Temporary in the settings, how is a folder where the files are still being unpacked and processed anything but temporary? The only things that should be in a folder called Completed are things that are actually completed (ie. safe to copy into the media store or up to a network share). It's backwards as it is. All extractions should be happening in the temporary folder, and only copied into completed when that is actually what they are. I understand this may make sense for your setup, but if anything this should be optional, with the current behavior non-default. For people like me who download to one location, and move to the network once the file is done, this creates a situation where other scripts and tools process the videos too early and all of the unpacking is happening over the network instead of on the local disk where the files were initially downloaded. I really don't understand the logic with the current setup. Maybe it works in your specific setup, but it's not logical at all, and is behaving contrary to the way that that the features are actually labelled.
jibjibjib
Newbie
Newbie
Posts: 2
Joined: May 11th, 2015, 12:15 pm

Re: Simple one: UNRAR to temp folder, THEN move

Post by jibjibjib »

switch wrote:Do you have a good reason for wanting to do it this way? A reasoned feature will help convince us to make the changes.

Since it would increase post processing time (having to unrar and move rather than just unrar) I would need a litle more detail before I would make the changes myself.
Related to your logic here, I don't get this either. If you are unpacking to a local disk and then moving to another location on the same disk, that should effectively just be a near instantaneous rename operation instead of what you seem to be describing which would be copy, then delete (the only way I could think of where your logic made sense). As it is, for people unpacking on one disk and then finishing on another (potentially networked) disk, you are creating a situation where the unpacking has to happen on that other (potentially remote) disk. All unpacking should happen in the temporary folder, and no transient files or folder at all should be created in a folder labelled 'completed'.
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Simple one: UNRAR to temp folder, THEN move

Post by shypike »

We'll reconsider the unpack method and related moving/copying
in a future 0.8.x release.
keksnase
Newbie
Newbie
Posts: 8
Joined: November 5th, 2013, 3:16 am

Re: Simple one: UNRAR to temp folder, THEN move

Post by keksnase »

sorry for resurrecting this old post but I need this feature too. for other reasons though:
In my case the output folder is being watched by another program (Plex). the moment a new file is placed created plex will try to scan it. on windows the file gets locked this way so it cannot be renamed and sabnzbd starts copying it. after renaming/copying the file is locked again (because plex is scanning the new file) and sabnzbd copies it again to the folder set by the category the download was in. for files with 10+gb this takes very long on my hdd and could be avoided if the extracting and renaming would take place in the temp folder.

kind regards
keksnase
nzbstr
Newbie
Newbie
Posts: 1
Joined: October 23rd, 2016, 9:21 pm

Re: Simple one: UNRAR to temp folder, THEN move

Post by nzbstr »

Just to stress that users still want this behaviour. This should be urgently fixed...

It's the "complete" folder. Not the "silly mix between temporary unpacking files and complete files" folder.
Alrescha
Newbie
Newbie
Posts: 9
Joined: January 26th, 2016, 3:04 pm

Re: Simple one: UNRAR to temp folder, THEN move

Post by Alrescha »

nzbstr wrote:Just to stress that users still want this behaviour.
Some users want this behavior. Personally, I fail to see the difference between the file arriving via copy vs unrar. The same bytes arrive in the same order.

A.
User avatar
safihre
Administrator
Administrator
Posts: 5338
Joined: April 30th, 2015, 7:35 am
Contact:

Re: Simple one: UNRAR to temp folder, THEN move

Post by safihre »

For 99% of users this is by far the best solution, just renaming the folder only requires a simple operation taking a maximum of seconds.
If we first unrar to 1 folder and then copy it to the destination, we are doubling the time. Why is this at all desired behavior?
Shouldn't you fix the reason why Sab has to copy, instead of doing the simple rename? For example stop Plex from scanning __UNPACK__ folders?
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
keksnase
Newbie
Newbie
Posts: 8
Joined: November 5th, 2013, 3:16 am

Re: Simple one: UNRAR to temp folder, THEN move

Post by keksnase »

I think there is a misunderstanding. I don't want extracting and then copying, neither (because it would take twice as long). I was just proposing that the extraction output folder should remain in temp and only after the last post-processing action this folder should be MOVED to it's final destination.

less words are sometimes more helpful:
currently: download finished, extract to final folder, post processing, folder renaming
want I propose: download finished, extract in the current "incomplete" folder, post processing, folder renaming / MOVE to final folder

with the current approach the post processing and folder renaming CAN conflict with 3rd party tools that scan the final output folder and lock files while scanning (e.g. media server like "plex")
User avatar
safihre
Administrator
Administrator
Posts: 5338
Joined: April 30th, 2015, 7:35 am
Contact:

Re: Simple one: UNRAR to temp folder, THEN move

Post by safihre »

But you describe does take twice as long.. Especially when Incomplete and Complete are not on the same disk (this is the whole reason this feature exists and why many users use it).
What you propose would mean in that situation of 2 disks:
Download finished, extract in the current "incomplete" folder (unrar from disk1->disk1 is slow!), post processing, folder renaming / MOVE to final folder (disk1->disk2, slow again).

All you would have to do is make sure your tools don't scan __UNPACK__ folders, then SAB can do a simple Rename operation which takes milliseconds..
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
keksnase
Newbie
Newbie
Posts: 8
Joined: November 5th, 2013, 3:16 am

Re: Simple one: UNRAR to temp folder, THEN move

Post by keksnase »

you're right! I hadn't thought about a scenario with two disks. for me everything is on the same disk.
sadly I cannot define exclusions in Plex
User avatar
safihre
Administrator
Administrator
Posts: 5338
Joined: April 30th, 2015, 7:35 am
Contact:

Re: Simple one: UNRAR to temp folder, THEN move

Post by safihre »

I completely forgot! Why don't you just disable the 'Enable folder rename' switch in Config>Switches?
Then no temp-__UNPACK__ folder is generated, it uses the final name. Although if you have Sorting turned on, this will still be performed after Unrar.
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
Post Reply