#!/usr/bin/env python
import sys,urllib
# Get clean NZB name
job_name = sys.argv[3]
# Prowl API settings - http://prowl.weks.net/api.php
# Set Prowl API
API = "enter the prowl api key here "
# Set Prowl priority. 0 - Normal, 2 - Emergency, -2 - Very Low
priority = "0"
# Set job title/event name
job_title = "Download%20Complete"
# Get current date/time and strip spaces
from time import gmtime, strftime
event_time = strftime("%d/%m/%y %H:%M")
event_time=event_time.replace(' ', '%20')
# URL encode chars from NZB name that cause issues
job_name=job_name.replace(' ', '%20')
job_name=job_name.replace('_', '%20')
job_name=job_name.replace('.', '%20')
# Send download complete notification to iPhone - swap 'job_title' for 'event_time' if completion time is required instead of 'Download Complete'
urllib.urlopen("https://prowl.weks.net/publicapi/add?apikey=" + API + "&priority=" + priority + "&application=SABnzbd&event=" + job_title + "&description=" + job_name)
set API="xxxxxxxxxxxxxxxxx"
Set Item=%3
setlocal enableextensions
set var_=%Item%
endlocal & set FileName=%var_%
Set desc="%FileName%"
set priority=0
cscript C:\prowl.vbs %API% %priority% %desc%
I went through that, I still can't figure what I need to do.
Sorry people, I am a complete novice with this and while I know how to look at scripts and have it working in terms of sending a test alert manually, I don't know how to load it into sabnzbd.
You don't "load it into" SABnzbd.
Make sure you set up a scripts folder in Config->Folders and put all the scripts in that folder.
Then SABnzbd will show a scripts column in queue, RSS and categories.
Only script that are executable (OSX, Linux) or have registered executable extensions (Windows: cmd, bat, exe etc.) will be shown.
Thank you. That was exactly what I needed to hear and it is working.
However the only issue I have is that all of the prowl's just come up as t= (t is curvy). it doesn't put the name of the file into the prowl. Am I missing something.
set API="xxxxxxxxxxxxxxxxx"
Set Item=%3
setlocal enableextensions
set var_=%Item%
endlocal & set FileName=%var_%
Set desc="%FileName%"
set priority=0
cscript C:\prowl.vbs %API% %priority% %desc%
I got this to work, but the file names are incomplete. ie if the name of the download was "How I Met Your Mother", prowl will only show "How". So it only shows the first word.