Hi, I just started learning about post-processing scripts and trying to make a simple xbmc onscreen notification when a download has been processed. Is it possible to pass the sort string (i.e. clean movie title) to the ExecBuiltIn Notification command?
I read http://wiki.sabnzbd.org/user-scripts and http://forums.sabnzbd.org/viewtopic.php?t=6203 but the closest I could find was a folder variable. Unfortunately, all my movies wind up in the same folder.
Running 0.5.6 in Lucid,
Thanks in advance
How to pass "sort string" to xbmc?
-
- Newbie
- Posts: 21
- Joined: September 16th, 2010, 11:54 am
Re: How to pass "sort string" to xbmc?
Wat is a sort string? Can you give an example?
And none of the first three parameters is useful for you?
1 The final directory of the job (full path)
2 The original name of the NZB file
3 Clean version of the job name (no path info and ".nzb" removed)
Have you tried them? Or can you give an example what the above looks like for a typical download?
And none of the first three parameters is useful for you?
1 The final directory of the job (full path)
2 The original name of the NZB file
3 Clean version of the job name (no path info and ".nzb" removed)
Have you tried them? Or can you give an example what the above looks like for a typical download?
-
- Newbie
- Posts: 21
- Joined: September 16th, 2010, 11:54 am
Re: How to pass "sort string" to xbmc?
Something like "%title %y %ext"found here: http://wiki.sabnzbd.org/configure-sortingWat is a sort string? Can you give an example?
No, because all the movies go to the same folder.The final directory of the job
Maybe, but it could be a convoluted name that's a little tricky to scrub, no? I usually just add the nzb from nzbmatrix. I guess I could rename the nzbs properly before adding them.The original name of the NZB file
Not sure, although I think that might be where to get it from, although that's a little beyond me.Clean version of the job name
Re: How to pass "sort string" to xbmc?
Isn't $3 useful? Or is that nonsense when you use RSS-feeds?
Anyway: time to test it: this is the postprocess-script I wrote on my system, and it gives useful info about $1 and $2 and $3:
So, if you run that, you can what $3 offers you ...
Anyway: time to test it: this is the postprocess-script I wrote on my system, and it gives useful info about $1 and $2 and $3:
Code: Select all
#!/bin/sh
echo $1 $2 $3 $4 $5 $6 $7 >> /home/sander/sab-logger.txt
Re: How to pass "sort string" to xbmc?
Here is a script that notifies xbmc and updates library:
http://dl.dropbox.com/u/18712538/Sabnzb ... library.sh
http://dl.dropbox.com/u/18712538/Sabnzb ... library.sh
-
- Newbie
- Posts: 21
- Joined: September 16th, 2010, 11:54 am
Re: How to pass "sort string" to xbmc?
Thanks, guys, $3 (clean version of the job name) is still not as clean as what SABnzbd leaves my file name as, namely "%title %y %ext" from the sort string. If the sort string can't be passed to a script, is it possible to repeat (in a script) what SABnzbd does to clean the file name down to "%title %y %ext"?
Re: How to pass "sort string" to xbmc?
Depends on when sab renames. Does it before or after postprocessing? (i don't use that option, so I don'tknow). If it does after postprocessing you could use dirname $1 or ls $1 or something to obtain info about folders or files.