Hey guys,
sorry if this is already on here somewhere but i did not find anything useful
via search...
i wrote a little programm for myself which checks some forums topics
every so often and looks for new posted nzbs... i have categorys set up
for all those different topics and would like sabnzbd to set the category
according to the nzb file name eg:
Test-abc
Test-gfd
Test-fkd
would go to category Test
Test2-fopd
Test2-ldfc
Test2-fdkm
would go to category Test2
is that possible somehow?
EDIT: forgot to say i could also create a rss feed for each category if that would help
Regards and thx in advance
Alex
Set Category based on NZB name
Forum rules
Help us help you:
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.
Re: Set Category based on NZB name
Yes, that's possible.
Hints:
Combine that with the python script given on the page about SABnzbd Pre-processing script (http://wiki.sabnzbd.org/user-pre-queue-script)
So ... untested code ... :
HTH
Hints:
Code: Select all
~$ python
Python 2.7.3 (default, Feb 27 2014, 20:00:17)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> nzbname = "Test2-fdkm"
>>> nzbname.split('-')[0]
'Test2'
So ... untested code ... :
Code: Select all
#!/usr/bin/env python
import sys
try:
(scriptname, nzbname, postprocflags, category, script, prio, downloadsize, grouplist, showname, season, episodenumber, episodename) = sys.argv
downloadsize = int(downloadsize)
except:
sys.exit(1) # exit with 1 causes SABnzbd to ignore the output of this script
print "1" # Accept
print
print
print nzbname.split('-')[0] # Category
print
print
print
sys.exit(0) # 0 means OK
-
- Newbie
- Posts: 2
- Joined: July 22nd, 2014, 4:54 am
Re: Set Category based on NZB name
well i'm a stupid idiot... just found out that i can just
save the nzb's from my programm to subfolders of the watched folder
that are named like the categories... :/
very quickly done and i did so much searching on that...
thanks anyways @ sander!
maybe you guys should move that from a little [1] to a full text feature!
save the nzb's from my programm to subfolders of the watched folder
that are named like the categories... :/
very quickly done and i did so much searching on that...
thanks anyways @ sander!
maybe you guys should move that from a little [1] to a full text feature!