what about extra nzb directories for categories?
Forum rules
Help us help you:
Help us help you:
- 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.
what about extra nzb directories for categories?
Hi!
I like the new categories-feature. But usually I simply put a .nzb file into my nzb directory which is loaded automatically from sabnzbd. But if I want to use different categories, I also have to login to sabnzbd and change the category.
So what about using category specific nzb directories, so sabnzbd knows from the directory it found the .nzb file, which category it is?
best regards
mcka
I like the new categories-feature. But usually I simply put a .nzb file into my nzb directory which is loaded automatically from sabnzbd. But if I want to use different categories, I also have to login to sabnzbd and change the category.
So what about using category specific nzb directories, so sabnzbd knows from the directory it found the .nzb file, which category it is?
best regards
mcka
Re: what about extra nzb directories for categories?
I requested that but the makers think it was better to do it this way:
To put it in a category from the blackhole put {{category here}} in front of the name of the nzb file. so if the category you want to put the nzb in is movies and the movie name is The Matrix, the name of the nzb file that you put in the blackhole would be {{movies}}The Matrix.nzb
PS,
I made for myself a batch file that i can launch when putting nzb files in a "category blackhole". so if i put the matrix.nzb in the folder category folder movies, the nzb file gets automatically renamed to {{movies}}the matrix.nzb. If you want, i can send it to you...
To put it in a category from the blackhole put {{category here}} in front of the name of the nzb file. so if the category you want to put the nzb in is movies and the movie name is The Matrix, the name of the nzb file that you put in the blackhole would be {{movies}}The Matrix.nzb
PS,
I made for myself a batch file that i can launch when putting nzb files in a "category blackhole". so if i put the matrix.nzb in the folder category folder movies, the nzb file gets automatically renamed to {{movies}}the matrix.nzb. If you want, i can send it to you...
Last edited by DeXeS on April 8th, 2008, 11:58 am, edited 1 time in total.
Re: what about extra nzb directories for categories?
I think it would be interesting for many people, what about posting it here?
I'm thinking about writing a patch to make category folders work in sabnzbd. It's quite simple, I think you only have to change about 10 lines.
http://sabnzbdplus.svn.sourceforge.net/ ... iew=markup
You basically have to put the code from line 152 - 260 into an own methode/procedure (e.g. called "scan_dir(path, category)"), and add somthing like the following instead:
Than you can use "category" as argument for NzbObject() calls in the scan_dir methode.
But I'm not a python programmer, so it's probably not 100% correct, but I doubt it would be much more difficult. Perhaps we can create a patch together?
I'm thinking about writing a patch to make category folders work in sabnzbd. It's quite simple, I think you only have to change about 10 lines.
http://sabnzbdplus.svn.sourceforge.net/ ... iew=markup
You basically have to put the code from line 152 - 260 into an own methode/procedure (e.g. called "scan_dir(path, category)"), and add somthing like the following instead:
Code: Select all
scan_dir(self.dirscan_dir, "default")
for root, dirs, files in os.walk(self.dirscan_dir):
for name in dirs:
scan_dir(os.path.join(root, name), name)
But I'm not a python programmer, so it's probably not 100% correct, but I doubt it would be much more difficult. Perhaps we can create a patch together?
Last edited by mcka on April 8th, 2008, 4:13 pm, edited 1 time in total.
Re: what about extra nzb directories for categories?
That would be nice but im not a programmer...
this is how my rename batch file looks like (this is probably the most crappy script
):
copy and past this in a windows dos batch file.
Oh, and you need Bulk Rename Command.
What i really would like is something like this (see attachment)
open it with this program and rename (if needed), put a category in the file name and copy it to the blackhole.
this is how my rename batch file looks like (this is probably the most crappy script

Code: Select all
@echo off
cls
SET blackhole=E:\SABnzbd\
SET cat1=DVD
SET cat2=AVI
SET cat3=Music
SET cat4=P
SET cat5=Xbox
SET cat6=App
SET cat7=Games
SET nocat=Geen Categorie
SET brcpath=E:\Install\Bulk Rename Command\BRC32.exe
"%brcpath%" /DIR:"%blackhole%%cat1%" /INSERT:{{%cat1%}}:01 /EXECUTE
"%brcpath%" /DIR:"%blackhole%%cat2%" /INSERT:{{%cat2%}}:01 /EXECUTE
"%brcpath%" /DIR:"%blackhole%%cat3%" /INSERT:{{%cat3%}}:01 /EXECUTE
"%brcpath%" /DIR:"%blackhole%%cat4%" /INSERT:{{%cat4%}}:01 /EXECUTE
"%brcpath%" /DIR:"%blackhole%%cat5%" /INSERT:{{%cat5%}}:01 /EXECUTE
"%brcpath%" /DIR:"%blackhole%%cat6%" /INSERT:{{%cat6%}}:01 /EXECUTE
"%brcpath%" /DIR:"%blackhole%%cat7%" /INSERT:{{%cat7%}}:01 /EXECUTE
copy /y "%blackhole%%cat1%" "%blackhole%%nocat%"
copy /y "%blackhole%%cat2%" "%blackhole%%nocat%"
copy /y "%blackhole%%cat3%" "%blackhole%%nocat%"
copy /y "%blackhole%%cat4%" "%blackhole%%nocat%"
copy /y "%blackhole%%cat5%" "%blackhole%%nocat%"
copy /y "%blackhole%%cat6%" "%blackhole%%nocat%"
copy /y "%blackhole%%cat7%" "%blackhole%%nocat%"
del "%blackhole%%cat1%\*.*" /F /Q
del "%blackhole%%cat2%\*.*" /F /Q
del "%blackhole%%cat3%\*.*" /F /Q
del "%blackhole%%cat4%\*.*" /F /Q
del "%blackhole%%cat5%\*.*" /F /Q
del "%blackhole%%cat6%\*.*" /F /Q
del "%blackhole%%cat7%\*.*" /F /Q
Oh, and you need Bulk Rename Command.
What i really would like is something like this (see attachment)
open it with this program and rename (if needed), put a category in the file name and copy it to the blackhole.
Re: what about extra nzb directories for categories?
I'll discuss it with the team.
But our todo list is getting quite long.
But our todo list is getting quite long.
Re: what about extra nzb directories for categories?
Hope that it will be a standard function in sabnzbd+ 
Also got this dos batch script from Brambo123 so all credits go to him:

Also got this dos batch script from Brambo123 so all credits go to him:
Code: Select all
echo off
set nzb=%1
SET blackhole=F:\Downloads\Sabnzbd\NZBDownload
SET brcpath=c:\brc\brc32.exe
set cat1=Muziek
set cat2=Niet in gebruik
set cat3=Niet in gebruik
set cat4=Niet in gebruik
set cat5=Niet in gebruik
set cat6=Niet in gebruik
set cat7=Niet in gebruik
set cat8=Niet in gebruik
title SabNZBd NZB Starter
if "12%nzb%3" == "123" goto error
:start
cls
echo. %error%
echo. ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
echo. º º
echo. º SabNZBd NZB Starter º
echo. º º
echo. ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
echo.
echo 1. Direct starten
echo 2. %cat1%
echo 3. %cat2%
echo 4. %cat3%
echo 5. %cat4%
echo 6. %cat5%
echo 7. %cat6%
echo 8. %cat7%
echo 9. %cat8%
echo.
set /p keuse=Categorie:
set error=
set cat=nee
if "%keuse%" == "1" goto copy
if "%keuse%" == "2" set cat=%cat1%
if "%keuse%" == "3" set cat=%cat2%
if "%keuse%" == "4" set cat=%cat3%
if "%keuse%" == "5" set cat=%cat4%
if "%keuse%" == "6" set cat=%cat5%
if "%keuse%" == "7" set cat=%cat6%
if "%keuse%" == "8" set cat=%cat7%
if "%keuse%" == "9" set cat=%cat8%
if "%cat%" == "nee" set error=Uw keuze (%keuse%) is ongeldig!
if "%cat%" == "nee" goto start
if "%cat%" == "Niet in gebruik" set error=Catogorie %keuse% is niet in gebruik!
if "%cat%" == "Niet in gebruik" goto start
copy /y %nzb% "%blackhole%temp"
start /wait %brcpath% /DIR:"%blackhole%temp" /INSERT:{{%cat%}}:01 /EXECUTE
copy /y "%blackhole%temp" "%blackhole%"
del %nzb% /F /Q
del "%blackhole%temp" /F /Q
exit
:error
cls
echo.
echo Dit script kan alleen gestart worden vanuit een bestand!
echo.
pause
exit
:copy
copy /y %nzb% "%blackhole%"
del %nzb% /F /Q
exit
Re: what about extra nzb directories for categories?
I just want all that is under TV on newzbin to end up in the TV-folder on my hdd. I thought the Create Category Folders under Newzbin in the config menu would do that but no difference. Does this feature not work when using the black hole? Does it work when using RSS?
I also dont understand how the newzbin field under categories is linked to newzbin? If you do all manually anyways then what impact does that field have?
I also dont understand how the newzbin field under categories is linked to newzbin? If you do all manually anyways then what impact does that field have?
Re: what about extra nzb directories for categories?
Read the Wiki pages.
newzbin reports are retrieved from the newzbin server.
If you want categories in the blackhole, you need to prefuix the category.
So an NZB "This Job.nzb" need to be named "{{tv}}This Job.nzb".
RSS, fully supports categories.
newzbin reports are retrieved from the newzbin server.
If you want categories in the blackhole, you need to prefuix the category.
So an NZB "This Job.nzb" need to be named "{{tv}}This Job.nzb".
RSS, fully supports categories.
Re: what about extra nzb directories for categories?
Hi,
The categories option for the blackhole directory would definitely be a welcome enhancement.
People like me that mainly use RSS (which is already setup with categories so no problem there) and by just dropping nzb files in the blackhole dir would really benefit from this enhancement.
Now I drop the file in there and go to the web interface to change the category if I just would have to drop the NZB in the correct nzb blackhole directory it would definitely be an improvement (I know, I am lazy
).
The categories option for the blackhole directory would definitely be a welcome enhancement.
People like me that mainly use RSS (which is already setup with categories so no problem there) and by just dropping nzb files in the blackhole dir would really benefit from this enhancement.
Now I drop the file in there and go to the web interface to change the category if I just would have to drop the NZB in the correct nzb blackhole directory it would definitely be an improvement (I know, I am lazy

Re: what about extra nzb directories for categories?
yet another very nice script made by Brambo123:
All credits go to Brambo123!Brambo123 wrote: script:Register:Code: Select all
echo off :: Config: SET blackhole=G:\Downloads\Sabnzbd\NZBDownload set cat1=Muziek set cat2=None set cat3=None set cat4=None set cat5=None set cat6=None set cat7=None set cat8=None :: Script: set nzb=%1 %2 %3 %4 %5 %6 %7 %8 %9 for %%I in (%nzb%) do set D1=%%~xI for %%I in (%nzb%) do set D2=%%~dpI for %%I in (%nzb%) do set D3=%%~nI title SABnzbd NZB Starter by Brambo123 set NZB=%D2%%D3%%D1% set errors=aan IF "%D1%"==".NZB" set errors=uit IF "%D1%"==".nzb" set errors=uit if "%errors%"=="aan" goto error title SABnzbd NZB Starter by Brambo123º %D3%%D1% :start cls echo. %error% echo. ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» echo. º º echo. º SABnzbd NZB Starter by Brambo123 º echo. º º echo. ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹ echo. º Category choice: º echo. ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ echo. echo Current name: %d3% echo. echo 1. Direct start echo 2. %cat1% echo 3. %cat2% echo 4. %cat3% echo 5. %cat4% echo 6. %cat5% echo 7. %cat6% echo 8. %cat7% echo 9. %cat8% echo. set /p keuse=Category: set error= set cat=nee if "%keuse%" == "1" set cat=None if "%keuse%" == "2" set cat=%cat1% if "%keuse%" == "3" set cat=%cat2% if "%keuse%" == "4" set cat=%cat3% if "%keuse%" == "5" set cat=%cat4% if "%keuse%" == "6" set cat=%cat5% if "%keuse%" == "7" set cat=%cat6% if "%keuse%" == "8" set cat=%cat7% if "%keuse%" == "9" set cat=%cat8% if "%cat%" == "nee" set error=Your choice (%keuse%) is invalid! if "%cat%" == "nee" goto start if "%cat%" == "None" set error=Category %keuse% is not in use! if "%cat%" == "None" goto start cls echo. echo. ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» echo. º º echo. º SABnzbd NZB Starter by Brambo123 º echo. º º echo. ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹ echo. º change name: º echo. ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ echo. echo. Current name: %d3% echo. set /p Naam=New name: if "12%Naam%3"=="123" set naam=%D3% copy /y "%nzb%" "%blackhole%\{{%cat%}}%naam%.nzb" del "%nzb%" /F /Q exit :error cls echo. echo This script can be only started from a NZB file! echo. pause exit
Code: Select all
Windows Registry Editor Version 5.00 :: SABnzbd starter by Brambo123 :: Microsoft windows Vista aurostart reg :: change the following rules for your "start.cmd" dir :: @=""G:\\SABnzbd\\script\\Start.cmd" "%1"" == G:\SABnzbd\script\start.cmd [HKEY_CLASSES_ROOT\Applications\Start.cmd\shell\open\command] @=""G:\\SABnzbd\\script\\Start.cmd" "%1"" :: not change the the following rules! [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.nfo] [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.nfo\OpenWithList] "a"="Start.cmd" "MRUList"="a" [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.nfo\UserChoice] "Progid"="Applications\\Start.cmd"
Re: what about extra nzb directories for categories?
Category sub-folders in the "watched folder" (aka blackhole) will be in Beta3.
Re: what about extra nzb directories for categories?
That's really great, thank you so much - looking forward to test it!shypike wrote: Category sub-folders in the "watched folder" (aka blackhole) will be in Beta3.