Page 1 of 1

xrecode2 post processing script

Posted: September 21st, 2011, 2:32 pm
by caewen
So, I got everything working pretty tip top. Sabnzbd saves me hours and hours of headaches. Just wanted to through that out there before I admit how stupid I am.

I am trying to get a post-processing script to run, and it looks like it is doing it. Problem is, it isn't actually doing anything.

Version: 0.6.9
OS: Windows 2008R2
Install-type: Windows Installer
Skin (if applicable): Plush
Firewall Software: None
Are you using IPV6?: no
Is the issue reproducible? yes

The script I am trying to run converts all .flac files found into mp3's and then moves the .flac files to a different directory. I am using xrecode2 to do the converting, and the script runs just fine when I do it manually. When I set it as a postprocessing script, it looks like it runs, but it doesn't actually convert anything.

Here is the .cmd file I am using:

Code: Select all

"c:\program files (x86)\xrecode ii\xrecode2.exe" /input "c:\downloads\music\*.flac" /output "c:\" /dest mp3 /recurse /createfullpath /moveto "c:\downloads\done\" /dontshowaddingfiles /dontshowprogress /noshowerr /of /usepreset /preset 0 
Here is the script output I am seeing in SABnzbd:

Code: Select all

C:\Program Files (x86)\SABnzbd>"c:\program files (x86)\xrecode ii\xrecode2.exe" /input "c:\downloads\music\*.flac" /output "c:\" /dest mp3 /recurse /createfullpath /moveto "c:\downloads\done\" /dontshowaddingfiles /dontshowprogress /noshowerr /of /usepreset /preset 0  
Like I said, it looks like it is running, but it doesn't actually do anything. Any help would be much appreciated :)

John

Re: xrecode2 post processing script

Posted: September 21st, 2011, 5:30 pm
by shypike
Does this script do anything when it's run from a command prompt?
Does it depend on having a specific folder as "current directory"?

Re: xrecode2 post processing script

Posted: September 21st, 2011, 5:44 pm
by caewen
The script works exactly as expected from a command prompt. It does a recursive search of the directory, and turns all the flacs into mp3s. Then it moves the flacs into the done directory.
I can run it from any directory on the server and it runs fine. Just can't seem to get it to work with sab.

Re: xrecode2 post processing script

Posted: September 22nd, 2011, 1:57 am
by shypike
It might not like the fact that console input and output are redirected to SABnzbd.
To avoid this, try using "start", which will make the program run independent of SABnzbd.
The side-effect are a) SABnzbd will not wait for it to finish and b) no output will be logged.
Maybe it's better to run it as an end-of-queue script, because otherwise multiple instances could be started.

Code: Select all

start "c:\program files (x86)\xrecode ii\xrecode2.exe" /input "c:\downloads\music\*.flac" /output "c:\" /dest mp3 /recurse /createfullpath /moveto "c:\downloads\done\" /dontshowaddingfiles /dontshowprogress /noshowerr /of /usepreset /preset 0 

Re: xrecode2 post processing script

Posted: September 22nd, 2011, 10:03 pm
by caewen
I tried to put the start command at the beginning of the script, and it is still not working. It opens another cmd process, but it just sits there. Will work on it more later. For now, just gonna keep running it through task scheduler every 15 minutes.

Thanks for tryin to help.

Re: xrecode2 post processing script

Posted: September 23rd, 2011, 2:33 am
by shypike
Does the path to the script contain spaces?