I get a lot of failed unpacking jobs caused by excessively long path and file names. I have moved the default directories that SAB uses to shorten the output paths, e.g., C:\sab\comp\ for completed jobs and C:\sab\incom\ for incomplete jobs. I also change the folder_max_length value from the default of 128 to 88, which is as short as I can go without causing duplicate folder names.
This is not a SAB problem per se, but rather a Windows problem compounded by posters who use long subject lines. My .nzb's come from RSS with short names, like 12345678.nzb. When SAB imports them, it makes folder names from the subject lines of the posts, which are very long.
The folder names have at least 70 characters of lah-lah at the beginning, followed by a unique identifier near the end. The lah-lah contains a string that identifies the post as one I want, so I have an Accept rule for that in the RSS settings. But once that string is read to allow the post to be passed to SAB, it could be deleted with the rest of the lah-lah.
I read the manual on pre-queue scripts. As near as I can tell, the title of the post, from which SAB will create the directory names, is not available to a pre-queue script. Only the .nzb file name is available.
An example of a generated directory name is:
[lah_lah]-[website_ad]-[poster_name]-[end_lah_lah]_[01+16]_-_`UniqueID.par2`_-_85,59_MB_yENC_(1+1
I could try to write a script to trim the lah-lah from the subject lines inside the .nzb's, but I think it might be easier to alter the SAB code so that instead of having the folder_max_length value trim from the end, it trims from the beginning.
Can anyone point me in the right direction for doing that? I know enough about Python to be able to work with the SAB code and really mess it up.
SABnzbd version: 0.7.17 Final
OS: Windows 7 64 bit, with cygwin and ActiveState Python 2.7.5
Install-type: Windows Installer
Is the issue reproducible? yes
How to shorten output paths on Windows
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: How to shorten output paths on Windows
Checkout the special option rss_filenames.
See: http://wiki.sabnzbd.org/configure-special-0-7
See: http://wiki.sabnzbd.org/configure-special-0-7
Re: How to shorten output paths on Windows
Thank you for the speedy reply. I had read that item without really understanding what it would do. That should resolve the problem for now. If I can get SAB running from the source code, maybe I can figure out where a "replace" would shorten these particular subject lines without affecting other .nzb files.
Re: How to shorten output paths on Windows
BTW: it's indeed true that the pre-script doesn't get the RSS name.
I will look for a solution that can pass this info, without breaking existing pre-scripts.
An alternative would be to provide a text filter to remove elements.
Possibly pseudo filters in the RSS filtering.
I will look for a solution that can pass this info, without breaking existing pre-scripts.
An alternative would be to provide a text filter to remove elements.
Possibly pseudo filters in the RSS filtering.