Automatically create subfolders for subs and samples
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.
-
- Newbie
- Posts: 9
- Joined: October 2nd, 2013, 5:14 am
Automatically create subfolders for subs and samples
Hi there,
I was wondering if it would be possible to automatically create sub folders for the subtitles and samples (if available) after downloading a scene release.
I couldn't find it on the board. Anyone can help me with this?
Thanks in advance!
Greetings
I was wondering if it would be possible to automatically create sub folders for the subtitles and samples (if available) after downloading a scene release.
I couldn't find it on the board. Anyone can help me with this?
Thanks in advance!
Greetings
Re: Automatically create subfolders for subs and samples
You would need your own post processing script for this.
More info: http://wiki.sabnzbd.org/user-scripts
More info: http://wiki.sabnzbd.org/user-scripts
-
- Newbie
- Posts: 9
- Joined: October 2nd, 2013, 5:14 am
Re: Automatically create subfolders for subs and samples
Okay thanks for pointing that out - I'll have a look!
-
- Newbie
- Posts: 9
- Joined: October 2nd, 2013, 5:14 am
Re: Automatically create subfolders for subs and samples
I saw this topic: http://forums.sabnzbd.org/viewtopic.php ... e&start=15 and that's where I found this script:
The script itself is working: when I put the .bat file in the folder I want to test it creates the 2 sub folders I want.
I am on Windows btw and my download directory is C:\Users\X\Documents\Downloads\complete.
However if I let sab run the post-script it returns with an error, this is what the log is showing:
I am a complete noob when it comes to scripts, could anyone point out to me what I might do wrong?
The download it self is 100% complete though, but obviously the sub folders aren't created.
Code: Select all
echo off
cd /c "%1"
IF EXIST *sample* (mkdir Sample && move *sample* "Sample") ELSE exit
IF EXIST *subs* (mkdir Subs && move *subs* "Subs") ELSE exit
I am on Windows btw and my download directory is C:\Users\X\Documents\Downloads\complete.
However if I let sab run the post-script it returns with an error, this is what the log is showing:
Code: Select all
2013-10-03 17:01:26,148::INFO::[__init__:893] C:\Users\X\Documents\Downloads\incomplete\teevee 720p bad ink\__ADMIN__\SABnzbd_nzf_buc3bt removed
2013-10-03 17:01:26,148::INFO::[__init__:893] C:\Users\X\Documents\Downloads\incomplete\teevee 720p bad ink\__ADMIN__\SABnzbd_nzf_ou9uet removed
2013-10-03 17:01:26,150::INFO::[misc:1295] Cannot remove folder C:\Users\X\Documents\Downloads\incomplete\teevee 720p bad ink\__ADMIN__
2013-10-03 17:01:26,151::INFO::[misc:1295] Cannot remove folder C:\Users\X\Documents\Downloads\incomplete\teevee 720p bad ink\__ADMIN__
2013-10-03 17:01:26,151::INFO::[postproc:84] Saving postproc queue
2013-10-03 17:01:26,151::INFO::[__init__:904] Saving data for postproc1.sab in C:\Users\X\AppData\Local\sabnzbd\admin\postproc1.sab
2013-10-03 17:01:26,151::INFO::[downloader:246] Post-processing finished, resuming download
2013-10-03 17:01:26,210::INFO::[downloader:664] Thread [email protected]:563: forcing disconnect
2013-10-03 17:01:26,309::INFO::[downloader:664] Thread [email protected]:563: forcing disconnect
2013-10-03 17:01:26,410::INFO::[downloader:664] Thread [email protected]:563: forcing disconnect
2013-10-03 17:01:26,509::INFO::[downloader:664] Thread [email protected]:563: forcing disconnect
2013-10-03 17:01:26,609::INFO::[downloader:664] Thread [email protected]:563: forcing disconnect
2013-10-03 17:01:26,710::INFO::[downloader:664] Thread [email protected]:563: forcing disconnect
2013-10-03 17:01:26,809::INFO::[downloader:664] Thread [email protected]:563: forcing disconnect
2013-10-03 17:01:26,910::INFO::[downloader:664] Thread [email protected]:563: forcing disconnect
2013-10-03 17:01:27,009::INFO::[downloader:664] Thread [email protected]:563: forcing disconnect
2013-10-03 17:01:27,109::INFO::[downloader:664] Thread [email protected]:563: forcing disconnect
2013-10-03 17:01:27,210::INFO::[downloader:664] Thread [email protected]:563: forcing disconnect
2013-10-03 17:01:27,309::INFO::[downloader:664] Thread [email protected]:563: forcing disconnect
2013-10-03 17:01:27,410::INFO::[downloader:664] Thread [email protected]:563: forcing disconnect
2013-10-03 17:01:27,509::INFO::[downloader:664] Thread [email protected]:563: forcing disconnect
2013-10-03 17:01:29,151::INFO::[nzbqueue:211] Saving queue
2013-10-03 17:01:29,201::INFO::[__init__:904] Saving data for queue9.sab in C:\Users\X\AppData\Local\sabnzbd\admin\queue9.sab
2013-10-03 17:01:29,203::INFO::[__init__:904] Saving data for totals9.sab in C:\Users\X\AppData\Local\sabnzbd\admin\totals9.sab
2013-10-03 17:01:29,203::INFO::[__init__:904] Saving data for rss_data.sab in C:\Users\X\AppData\Local\sabnzbd\admin\rss_data.sab
2013-10-03 17:01:29,203::INFO::[__init__:904] Saving data for bookmarks.sab in C:\Users\X\AppData\Local\sabnzbd\admin\bookmarks.sab
2013-10-03 17:01:29,204::INFO::[__init__:904] Saving data for watched_data.sab in C:\Users\X\AppData\Local\sabnzbd\admin\watched_data.sab
2013-10-03 17:01:29,206::INFO::[postproc:84] Saving postproc queue
2013-10-03 17:01:29,206::INFO::[__init__:904] Saving data for postproc1.sab in C:\Users\X\AppData\Local\sabnzbd\admin\postproc1.sab
2013-10-03 17:01:29,207::INFO::[postproc:651] Queue has finished, launching: None (None)
The download it self is 100% complete though, but obviously the sub folders aren't created.
Re: Automatically create subfolders for subs and samples
Doesn't look like the script runs.
Did you set one? Do you see it as one of the job attributes?
Did you set one? Do you see it as one of the job attributes?
-
- Newbie
- Posts: 9
- Joined: October 2nd, 2013, 5:14 am
Re: Automatically create subfolders for subs and samples
Yes I see the script in sabnzbd's menu. Its reporting an post processing error (see log).
The only error I can see in the log however is this:
error: (5, 'GetShortPathName', 'Access Denied.') <-- what could be the reason of this error?
The only error I can see in the log however is this:
Code: Select all
2013-10-03 21:41:17,674::INFO::[postproc:490] Traceback:
Traceback (most recent call last):
File "sabnzbd\postproc.pyo", line 432, in process_job
File "sabnzbd\newsunpack.pyo", line 140, in external_processing
File "sabnzbd\newsunpack.pyo", line 1331, in build_command
error: (5, 'GetShortPathName', 'Access Denied.')
Re: Automatically create subfolders for subs and samples
Check permissions of the file and the folder in which it resides.
-
- Newbie
- Posts: 9
- Joined: October 2nd, 2013, 5:14 am
Re: Automatically create subfolders for subs and samples
I checked the permissions, every directory is accessible.
This is the message sab gives after completing a download:
This is the message sab gives after completing a download:
Code: Select all
Script
Exit(1) There is already a sub folder or file Sample. (More)
Code: Select all
(More)
C:\Program Files (x86)\SABnzbd>echo off
The syntax of the file name, folder name or volume name is incorrect.
Sub folder or file Sample is already there.
Re: Automatically create subfolders for subs and samples
So the script runs and what you see is the output of your own script.
The problem is this statement:
IF EXIST *sample* (mkdir Sample && move *sample* "Sample") ELSE exit
File names on Windows are not case-sensitive, so your ALSO trying to move the new folder Sample to the new folder Sample.
The same is true for the next line.
The problem is this statement:
IF EXIST *sample* (mkdir Sample && move *sample* "Sample") ELSE exit
File names on Windows are not case-sensitive, so your ALSO trying to move the new folder Sample to the new folder Sample.
The same is true for the next line.
-
- Newbie
- Posts: 9
- Joined: October 2nd, 2013, 5:14 am
Re: Automatically create subfolders for subs and samples
Could you perhaps tell me how I should change these lines in order to get it working? Or is it just not do-able to have only a couple of - simple - lines of code because its Win?
Re: Automatically create subfolders for subs and samples
You'll have to ask this question in the scripts sub-forum.
I've stopped writing other people's scripts.
Nothing personal, but I prefer to spend my time on SABnzbd itself.
I've stopped writing other people's scripts.
Nothing personal, but I prefer to spend my time on SABnzbd itself.
-
- Newbie
- Posts: 9
- Joined: October 2nd, 2013, 5:14 am
Re: Automatically create subfolders for subs and samples
Ok thanks for your input shypike the last couple of weeks! You can close this topic my problem is solved.