Pre-Queue Windows Category Script

Come up with a useful post-processing script? Share it here!

Pre-Queue Windows Category Script

Postby micr0shaft » July 18th, 2011, 8:13 am

Hi I have been using SABnzbd for 2 days now, After I setup NZBVortex on my lion hackintosh I started looking for a windows NZB downloader that could use RSS to download my T.V episodes automatically and I found something better SABnzbd + Sick beard ;D


So I got it all setup good using Sickbeard/nzbstatus/SABConnect++/SABMobile/myNZB etc.. on multiple pcs/laptops and iphones but I had a problem when trying to download some nzbs from nzbsrus I have my login details/API Key set for Nzbmatrix and Newzbin aswell but when downloading from nzbsrus website (which I use the most) downloads other than T.V that couldn't be sorted by Usenet Group (such as .boneless that is used for multiple content) would be in the Default category, So after reading the Wiki & forums I decided to make a quick cmd script to handle the downloads that were in the Default category by looking for keywords in the download name and assigning a category based on the keywords matched.

It is not perfect but if you have filled in a lot of well known usenet groups under the matching category's already this will help.

Code: Select all
@echo off

echo 1
echo.
echo.

set notin=""
IF %3==%notin% (
    GOTO START
) ELSE (
    GOTO DFCHK2
)

:DFCHK2

IF %3==Default (
    GOTO START
) ELSE (
    GOTO DFCHK3
)

:DFCHK3

IF %3=="Default" (
    GOTO START
) ELSE (
    GOTO END
)

:START

set srhres=0
echo %1 > %temp%\nzbsort.tmp

:MOVIES

for /f "tokens=*" %%a in (
'findstr /i "telesync R5 CAM DVDScr DVDR DVDRip BluRay BDRip BRRiP" %temp%\nzbsort.tmp'
) do (
set srhres=%%a
)

set srhres=%srhres:"=%

IF "%srhres%"=="0" (
    GOTO TV
) ELSE (
    echo movies
)

GOTO END

:TV

for /f "tokens=*" %%a in (
'findstr /i /r "S[0-9][0-9]E[0-9][0-9]" %temp%\nzbsort.tmp'
) do (
set srhres=%%a
)

set srhres=%srhres:"=%

IF "%srhres%"=="0" (
    GOTO NDS
) ELSE (
    echo tv
)

GOTO END


:NDS

for /f "tokens=*" %%a in (
'findstr /i "NDS (E) (U) (EU) (M5) (M4) (M6) (Europe) (J)" %temp%\nzbsort.tmp'
) do (
set srhres=%%a
)

set srhres=%srhres:"=%

IF "%srhres%"=="0" (
    GOTO XB360
) ELSE (
    echo games.ds
)

GOTO END


:XB360

for /f "tokens=*" %%a in (
'findstr /i "XBOX360 XBOX360-" %temp%\nzbsort.tmp'
) do (
set srhres=%%a
)

set srhres=%srhres:"=%

IF "%srhres%"=="0" (
    GOTO PS3
) ELSE (
    echo *xbox360*
)

GOTO END



:PS3

for /f "tokens=*" %%a in (
'findstr /i "PS3 PS3-" %temp%\nzbsort.tmp'
) do (
set srhres=%%a
)

set srhres=%srhres:"=%

IF "%srhres%"=="0" (
    GOTO WII
) ELSE (
    echo consoles.ps3
)

GOTO END


:WII
for /f "tokens=*" %%a in (
'findstr /i "Wii" %temp%\nzbsort.tmp'
) do (
set srhres=%%a
)

set srhres=%srhres:"=%

IF "%srhres%"=="0" (
    GOTO APPS
) ELSE (
    echo wii
)

GOTO END


:APPS
for /f "tokens=*" %%a in (
'findstr /i "Keymaker Keygen Retail patch regged winall cracked x86 x64 -DVTiSO -iso" %temp%

\nzbsort.tmp'
) do (
set srhres=%%a
)

set srhres=%srhres:"=%

IF "%srhres%"=="0" (
    GOTO PSP
) ELSE (
    echo apps.pc
)

GOTO END


:PSP
for /f "tokens=*" %%a in (
'findstr /i "PSP PSP-" %temp%\nzbsort.tmp'
) do (
set srhres=%%a
)

set srhres=%srhres:"=%

IF "%srhres%"=="0" (
    GOTO PCGAMES
) ELSE (
    echo games.psp
)

GOTO END

:PCGAMES
for /f "tokens=*" %%a in (
'findstr /i /r ".*-RELOADED .*-SKIDROW .*-FASiSO .*-TiNYiSO .*-HEiST .*-FLT .*-CLONEDVD .*-DEViANCE

.*-POSTMORTEM .*Razor1911" %temp%\nzbsort.tmp'
) do (
set srhres=%%a
)

set srhres=%srhres:"=%

IF "%srhres%"=="0" (
    GOTO IPA
) ELSE (
    echo games*pc
)

GOTO END




:IPA
for /f "tokens=*" %%a in (
'findstr /i /r "iPad iPhone iPod ipa" %temp%\nzbsort.tmp'
) do (
set srhres=%%a
)

set srhres=%srhres:"=%

IF "%srhres%"=="0" (
    GOTO END
) ELSE (
    echo apps.phone
)



:END

echo.
echo.
echo.
echo.

del /s /f %temp%\nzbsort.tmp


* Note:

This will not override a download that has been categorized already only downloads marked as Default.

I haven't included the music category in the script as most music nzbs don't have any useable keywords to check against the download name.

You should have all known TV usenet groups set in category under Groups / Indexer tags or dvdrips of tv show dvds tagged with "DVDR" or "DVDRip" will be downloaded as movies.

Install:

You'll need to either change your category's to match the script or make changes to the script:

IF "%srhres%"=="0" (
GOTO TV
) ELSE (
echo movies
)

Change movies to the name of your movie category and so on for the rest of the script...

If you haven't already define a Post-Processing folder:
Image

Copy the code above into a .bat/.cmd file & save to Post-Processing folder then select it on the switches page:
Image

This is how my category's are setup:
Image

My Groups / Indexer tags

Code: Select all
*XBOX 360*, games.xbox360*, alt.binaries.games.xbox360

Applications*, 0-Day, PC iSO, alt.binaries.warez.quebec-hackers, alt.binaries.warez.ibm-pc.0-day, alt.binaries.warez.ibm-pc, alt.binaries.warez.0-day, alt.binaries.warez.ibm-pc.os, alt.binaries.warez.ibm-pc.apps

games.ps3, *PS3*, alt.binaries.console.ps3, alt.binaries.cd.image.playstation

games.windows, alt.binaries.games.dox, alt.binaries.warez.games, alt.binaries.warez.0-day.games, alt.binaries.warez.ibm-pc.german.games, alt.binaries.cd.image.games, alt.binaries.warez.games

games.ps3, *PS3*, alt.binaries.console.ps3, alt.binaries.cd.image.playstation

nds, consoles.nintendo.*, handheld.ds, alt.binaries.nintendo.ds, alt.binaries.games.nintendods

psp, handheld.psp, alt.binaries.sony.psp

movies.*, *CAM*, *R5*, *DVD*, alt.binaries.movies.divx, alt.binaries.moovee, alt.binaries.movies, alt.binaries.movies.xvid, alt.binaries.drummers, *.disney, alt.binaries.movies.divx, *.movie*

music.*, mp3, FLAC, Lossless, alt.binaries.sounds.mp3.complete_cd, alt.binaries.sounds.lossless, alt.binaries.sounds.mp3, alt.binaries.mp3, alt.binaries.warez.uk.mp3, alt.binaries.mpeg.video.music

TV, TV.*, TV:*, alt.binaries..multimedia, *.hdtv, *.teevee, alt.binaries.tv, alt.binaries.multimedia.cartoons, alt.binaries.hdtv.x264

alt.binaries.games.wii, alt.binaries.wii.gamez



I also had a problem with SABConnect++ & Chrome using Nzbsrus it passes the usenet group name as the category iv managed to work around this by adding some code to the script and setting up SABConnect++ as below:

Image


Feel free to amend/error check or improve this script, Hope it helps someone.
Micr0shaft..
User avatar
micr0shaft
Newbie
Newbie
 
Posts: 1
Joined: July 18th, 2011, 4:50 am

Re: Pre-Queue Windows Category Script

Postby pmow » September 27th, 2011, 1:27 pm

All this is fine and all, but considering the hideousness of the nzbs'r'us website, couldn't someone just get one of the three open indexers, and avoid this mess?

If you really wanted to, you could simply add "*teevee*, *tv*" for example and get all groups with that in the name. Just a thought.
User avatar
pmow
Release Testers
Release Testers
 
Posts: 68
Joined: May 15th, 2009, 7:09 pm
Location: Florida


Return to Post-Processing Scripts