Page 1 of 1
Append the nfo to the email status
Posted: September 22nd, 2009, 3:29 pm
by MageMinds
I wish I would receive the content of the nfo or have the nfo attached to the email when a job is successfully completed...
Thanks
Re: Append the nfo to the email status
Posted: September 23rd, 2009, 2:20 am
by shypike
Write a user script which just contains:
That way your NFO will be listed in the body of the email.
Re: Append the nfo to the email status
Posted: September 23rd, 2009, 5:33 am
by MageMinds
You're right, that's clever... Thanks!
Re: Append the nfo to the email status
Posted: October 27th, 2009, 1:29 am
by Karyudo
This sounds cool, but I'm a huge dummy. Could you give me juuust a little more info on how to set this up? I don't see anywhere obvious. (I'm running 4.12 rather than a 5.x alpha/beta -- does that make a difference?)
Re: Append the nfo to the email status
Posted: October 27th, 2009, 10:11 am
by shypike
0.4.12 supports it too.
See:
http://sabnzbd.wikidot.com/user-scripts
Use notepad to create a text file containing the lines.
Save in a separate folder as file type-nfo.cmd.
Fill in the full path to the folder in the "script" field in Config->Folders (click Save).
In Config->Switches, pick the right script in the "Default Script" selection box.
Re: Append the nfo to the email status
Posted: October 27th, 2009, 1:00 pm
by Eejit
That's brilliant.!!
Took me a while to get it sorted because under Win7, it would appear that the quotes have to be removed, which
is different from:-
http://sabnzbd.wikidot.com/user-scripts
A Microsoft undocumented change?
Re: Append the nfo to the email status
Posted: October 27th, 2009, 1:07 pm
by shypike
No, the example I gave is incorrect, the Wiki page is true.
I sometimes forget, because it's so counter-intuitive.
We'd prefer that a Windows script would receive parameters without quotes.
BTW: this is not Microsoft's fault, but that of the designers of the Python runtime library.
Re: Append the nfo to the email status
Posted: October 27th, 2009, 1:38 pm
by Eejit
Here's what confused me. From the Wiki
This is what I used under Win7
Unless I've totaly mis-understood it, which wouldn't be the first time
Re: Append the nfo to the email status
Posted: October 28th, 2009, 3:46 am
by shypike
There is no contradiction.
Normally when you get parameters that may contain spaces, you need to add quotes.
So normally you would write this:
This is the proper way to do it in Windows.
However, since the Python runtime always includes the quotes, you cannot add them again in your script.
So you must write:
Combining SABnzbd and the
first script would result in this:
Code: Select all
@echo off
type ""c:\mypath\myfolder\hello.nfo""
This, Windows doesn't understand.
Re: Append the nfo to the email status
Posted: November 1st, 2009, 11:41 pm
by Karyudo
shypike wrote:
0.4.12 supports it too.
See:
http://sabnzbd.wikidot.com/user-scripts
Use notepad to create a text file containing the lines.
Save in a separate folder as file type-nfo.cmd.
Fill in the full path to the folder in the "script" field in Config->Folders (click Save).
In Config->Switches, pick the right script in the "Default Script" selection box.
I got it working! And then I broke it, by tinkering. I modified to script to read:
Code: Select all
@echo off
type %1\*.nfo
echo
echo Path to files: %1
echo NZB Filename: %2
echo Newzbin Report: %4
echo Category: %5
echo Usenet Group: %6
In the .log file, I'm getting the .nfo files for every episode I've already downloaded, which isn't exactly what I'd expected, but makes sense given the "\*.nfo" part.
Also, I'm getting sabnzbd hanging on the "Running Script..." portion. It just never completes.
Any ideas??
Re: Append the nfo to the email status
Posted: November 2nd, 2009, 7:13 am
by shypike
Are you using TV sorting so that files are dumped in a single folder?
(So that you have all nfo's in a single folder).
I don't know about the "hangup".
It may help if you end the script with:
Re: Append the nfo to the email status
Posted: November 2nd, 2009, 8:36 pm
by Karyudo
Yeah, I've got all the eps from any given show in one folder, so all the .nfos get appended. Hmm...
My installation also hangs when unRARing sometimes; I might just need to troubleshoot some larger issue. But I'll try the "exit 0" line and see...
Thanks!