I recently set sabnzd to copy completed files in the "TV" category to a network mount, but the problem is the way that this is done is 1) the rars are unpacked to the network mount, then the file on the network mount is COPIED out of the unpack directory into the final directory, and finally the unpacked file is discarded.
The trouble is, this causes the unpack to take an absurdly long time, and it triples the bandwidth being used.
Is there any way to get sabnzbd to unpack the files in the download directory and only copy them to the final location after the complete file is extracted?
unpacking across network behavior
Forum rules
Help us help you:
Help us help you:
- Are you using the latest stable version of SABnzbd? Downloads page.
- Tell us what system you run SABnzbd on.
- Adhere to the forum rules.
- Do you experience problems during downloading?
Check your connection in Status and Interface settings window.
Use Test Server in Config > Servers.
We will probably ask you to do a test using only basic settings. - Do you experience problems during repair or unpacking?
Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Re: unpacking across network behavior
Easiest way is to have SAB unRAR them locally and then have a post processing script to move the files to their final destination.
The Bandwidth shouldn't be 3x, as the files from the unpack dir get moved to the final folder, not copied, from my experience at least. Unraring across the network is a major PITA, so the above is really the only way to handle it effectively, or run SAB on the Network server (if possible).
-Markus
The Bandwidth shouldn't be 3x, as the files from the unpack dir get moved to the final folder, not copied, from my experience at least. Unraring across the network is a major PITA, so the above is really the only way to handle it effectively, or run SAB on the Network server (if possible).
-Markus
Co-developer of NzbDrone (.Net NNTP PVR) - http://www.nzbdrone.com
Re: unpacking across network behavior
Yeah, I've watched the files getting copied. Running SAB on that server is not a good idea since almost all the files I download stay on this machine, only the TV shows get put on the network mount.
would the post-processing script be something as simple as
?? I've never looked into the post-processing scripts before.
and can I setup a post-process for just TV shows?
Suggestion: SABnzb needs a flag where the unrar takes place in the download location
OK, I looked at the data passed to post-processing scripts and no combination of data actually makes up the pathname to the file. $1 is the folder but when i downlaoded a subpack to test, nothing contained the actual name(s) of the file(s):
"underbelly.a_tale_of_two_cities.2x03.brave_new_world.hdtv_xvid-fov.sub"
"underbelly.a_tale_of_two_cities.2x03.brave_new_world.hdtv_xvid-fov.idx"
So, feeling stupid here, how do I move the files out of $1 to another location?
mv $1/* /path/to/mount/
?? That seems rather fugly. What am i missing?
would the post-processing script be something as simple as
Code: Select all
#/bin/sh
mv $argv /path/to/network/mount
and can I setup a post-process for just TV shows?
Suggestion: SABnzb needs a flag where the unrar takes place in the download location
OK, I looked at the data passed to post-processing scripts and no combination of data actually makes up the pathname to the file. $1 is the folder but when i downlaoded a subpack to test, nothing contained the actual name(s) of the file(s):
"underbelly.a_tale_of_two_cities.2x03.brave_new_world.hdtv_xvid-fov.sub"
"underbelly.a_tale_of_two_cities.2x03.brave_new_world.hdtv_xvid-fov.idx"
So, feeling stupid here, how do I move the files out of $1 to another location?
mv $1/* /path/to/mount/
?? That seems rather fugly. What am i missing?
Last edited by syth on February 26th, 2009, 1:06 pm, edited 1 time in total.
Re: unpacking across network behavior
You're right with:
Not missing anything, that will move all the files, you could write logic to the script to only move avi files, but that seems overkill. Somethign like this will find only the AVI files and move them:
You can assign post-processing scripts only to the Category TV, which will work wonders if you are using Newzbin, if you're not version 0.5 (Currently not released and available through SVN only) allows you to assign categories RSS feeds (if you're using RSS feeds).
-Markus
Code: Select all
mv $1/* /path/to/mount/
Code: Select all
FILEZ[1]="$1`find . -regex '.*/.*\.avi' | sed 's/^\.//'`"
#Move the avi to the network share
mv "${FILEZ[1]}" "/path/to/mount/"
-Markus
Co-developer of NzbDrone (.Net NNTP PVR) - http://www.nzbdrone.com
Re: unpacking across network behavior
I ended up with a simple scriptmarkus101 wrote: You're right with:Not missing anything, that will move all the files, you could write logic to the script to only move avi files, but that seems overkill. Somethign like this will find only the AVI files and move them:Code: Select all
mv $1/* /path/to/mount/
Code: Select all
FILEZ[1]="$1`find . -regex '.*/.*\.avi' | sed 's/^\.//'`" #Move the avi to the network share mv "${FILEZ[1]}" "/path/to/mount/"
Code: Select all
#!/bin/sh
THEPATH=$1
cp -r "$THEPATH" /Volumes/Trinity/TV/C2D/
I like the find, but I don't understand the syntax "$1`find ... shouldn't there be a pipe or something?
Re: unpacking across network behavior
No, you're no redirecting that output, but rather placing that before the actual AVI file name as is returned by the find statement. using the ` (below the Esc Key, not a single quote) you're running a command and appending its out put the {FILEZ[1]} which would make it /current/path/name.avi
Didn't make a whole bunch of sense to me at first, starting to get it now though.
-Markus
Didn't make a whole bunch of sense to me at first, starting to get it now though.
-Markus
Co-developer of NzbDrone (.Net NNTP PVR) - http://www.nzbdrone.com
Re: unpacking across network behavior
Oh, right. That makes sense.markus101 wrote: ... appending its out put the {FILEZ[1]} which would make it /current/path/name.avi
Wouldn't this all be easier if SABnzbd+ returned the path to the file, the filename (an array of filenames I guess), and the count of files?
Eh, whatever. it works for my limited and lame needs, and that's ALL THAT MATTERS. Thanks.
Re: unpacking across network behavior
No problem, glad I could help.
-Markus
-Markus
Co-developer of NzbDrone (.Net NNTP PVR) - http://www.nzbdrone.com