Newbie Windows Post-processing script confusion

Get help with all aspects of SABnzbd
Forum rules
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.
Post Reply
JPW
Newbie
Newbie
Posts: 18
Joined: May 21st, 2011, 6:42 am

Newbie Windows Post-processing script confusion

Post by JPW »

I'm fairly ignorant working with all this and probably just brain dead when it comes to Linux eventhough I have managed to successfully build an unRAID server for my media. Ultimately, I even have SickBeard, CouchPotato, Sabnzbd, and YAMJ (with Eversion skin) all running just fine via a Windows HTPC. However, I do have one item that I hope to automate better.

At the moment I simply have my HTPC turn on during a portion of each day and via Task Scheduler YAMJ runs at intermittent times. The problem is something could have downloaded after YAMJ runs and I won't see it on my Popcorn Hour until the next day.

The information I've seen on the forum around scripting seems to be mostly for Linux. Can anyone help walk a newbie like myself on how to do this in Windows? Thanks for any help.
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Newbie Windows Post-processing script confusion

Post by shypike »

You're not describing very accurately what you want, so don't expect many answers.
Also, please don't start posting this question in multiple boards.
The scripting crowd hangs out in the other board, so if you're not getting an answer there,
you won't get one here either.
JPW
Newbie
Newbie
Posts: 18
Joined: May 21st, 2011, 6:42 am

Re: Newbie Windows Post-processing script confusion

Post by JPW »

I apologize. I did delete the initial post after posting it here once I saw that the Scripting Forum seemed to center more around posting what others saw as successful scripts. In my case I was trying to understand more around how to accomplish running YAMJ, which I currently have running from Task Scheduler via a CMD file. After doing a bit more research I found for Windows you could indeed use a CMD file, BAT file, EXE, etc., so that helped me quite a bit. For some reason I was assuming it had to be in Python, which I'm not very familiar with.

Anyway, I haven't tested it yet, because SAB hasn't seen anything yet to download, but I'm hoping for my Movies category now it will indeed run YAMJ now that I have my YAMJ.CMD script listed along with the Movies category. If that does work, my only other question will be how do you execute more than one script? For example, like many, I'm using Sickbeard. The category I have for it is TV and in the drop-down box for scripts it has to reflect the SabtoSickbeard.exe. Could I simply add a duplicate TV category and list my YAMJ.CMD script as well?
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Newbie Windows Post-processing script confusion

Post by shypike »

You can only attach one script to a job.
However it is possible to make a wrapper script that calls two others scripts:

Code: Select all

@echo off
call first_script.cmd %1 %2 %3 %4 %5 %6 %7 %8 %9
call second_script.cmd %1 %2 %3 %4 %5 %6 %7 %8 %9
You probably need to specify a full path the called scripts.
JPW
Newbie
Newbie
Posts: 18
Joined: May 21st, 2011, 6:42 am

Re: Newbie Windows Post-processing script confusion

Post by JPW »

I thought of that, but my main concern is around the Sabtosickbeard.exe script that people use often in Sabnzbd. I'm fairly certain data is passed between Sabnzbd and Sickbeard during the post-processing so I don't think it would work to simply execute Sabtosickbeard.exe within another script. Please someone tell me I'm wrong.
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Newbie Windows Post-processing script confusion

Post by shypike »

Makes no difference.
Just try it.
It's probably best to have the sickbeard script as the first one.
Yes that script may move the data away, but I assume your second script isn't really using the parameters.
JPW
Newbie
Newbie
Posts: 18
Joined: May 21st, 2011, 6:42 am

Re: Newbie Windows Post-processing script confusion

Post by JPW »

Will do. I'll follow-up once I've tried a little testing and pass on the results.
JPW
Newbie
Newbie
Posts: 18
Joined: May 21st, 2011, 6:42 am

Re: Newbie Windows Post-processing script confusion

Post by JPW »

It didn't work. I did place the Sabtosickbeard.exe first within the script which now contains both scripts. It resulted in, "No folder supplied - is this being called from SABnzbd?" YAMJ ran afterwards just fine. See the truncated script log below:

No folder supplied - is this being called from SABnzbd?
Yet Another Movie Jukebox 2.4-SNAPSHOT
~~~ ~~~~~~~ ~~~~~ ~~~~~~~ ~~~~~~~~~~~~
http://code.google.com/p/moviejukebox/
Copyright (c) 2004-2011 YAMJ Members

This software is licensed under a Creative Commons License
See this page: http://code.google.com/p/moviejukebox/wiki/License

Revision: r2236
Build Date: 2011-03-22 12:10:46

Processing started at Tue Oct 04 14:23:52 CDT 2011

Using properties file ./properties/moviejukebox-default.properties
Using properties file ./moviejukebox.properties
Using properties file ./skins/default/skin.properties
Using properties file ./skins/default/skin-user.properties
Using properties file ./properties/apikeys.properties
Found media library: Z:\
Using 1 processing threads and 1 downloading threads...
JPW
Newbie
Newbie
Posts: 18
Joined: May 21st, 2011, 6:42 am

Re: Newbie Windows Post-processing script confusion

Post by JPW »

Also, in case this helps at all. Below is the CMD file I created for the script that basically contains the two scripts, Sabtosickbeard.exe and YAMJ:

@Echo OFF
C:
CD \Program Files\SickBeard-win32-alpha-build487\Scripts
sabToSickBeard.exe
CD \YamJ
My_YAMJ.cmd
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Newbie Windows Post-processing script confusion

Post by shypike »

Shouldn't you add %1 %2 %3 %4 %5 %6 %7 %8 %9 to the SickBeard call?
Doesn't it need the parameters?
JPW
Newbie
Newbie
Posts: 18
Joined: May 21st, 2011, 6:42 am

Re: Newbie Windows Post-processing script confusion

Post by JPW »

Sorry, I'm really ignorant about the details of how all this works. I wasn't aware those were parameters that might need to be added. Let me add "%1 %2 %3 %4 %5 %6 %7 %8 %9" after the "sabToSickBeard.exe" command and see what happens. Thanks for your help with this. I do appreciate it.
JPW
Newbie
Newbie
Posts: 18
Joined: May 21st, 2011, 6:42 am

Re: Newbie Windows Post-processing script confusion

Post by JPW »

It worked! Amazing! Thank you so much for your help. This really helps add a lot of functionality for me.
Post Reply