Eggdrop TCL for SABnzbd

Got a program that plays well with SABnzbd? Share it here!
Post Reply
dr0pknutz
Newbie
Newbie
Posts: 7
Joined: May 6th, 2008, 8:42 pm

Eggdrop TCL for SABnzbd

Post by dr0pknutz »

Hi all,

Just been playing round writing my first TCL script for Eggdrop. This basically allows you to view your current SABnzbd stats and also output the queue to the specified IRC channels.

As of v0.2 you can now Pause/Resume/Add URLs or Newzbin IDs/Set and remove speed limits/Display version information.

As of v0.3 you can now search both TVBINZ.net and NZBIndex.nl and add posts from there. The use of TVBINZ.net requires the zlib TCL package. There is a link to it in the script.

As of v0.4 you can now search Binsearch.info and add posts from there. You can add multiple collections. For instance sometimes there will be two collections for a release. 1 is the PAR2 files, the other the RAR files. If you specify both the IDs, they are combined and sent to SABnzbd. You can also specify the name of the NZB with the -n switch. Otherwise Binsearch assigns it the header name which can be extremely long.

As of v0.5 there is support for searching Newzleech.com. And allows you to do the exact same thing as Binsearch with the adding of multiple post IDs

Questions, bugs, suggestions post a reply here or find me on EFnet, username: dr0pknutz.

Script can be found at: http://www.meaclem.com/sabnzbd-0.5.tcl

Example output shown below:
[23:50] !sabnzbd stats
[23:50] [SABnzbd Stats] Speed:[225.91Kb/s] Queue Status:[15732.39MB/23475.48MB(21 items)] Time Remaining:[19:48:32] Current Job:[Ubuntu 8.10 (Beta) (10.73MB/777.79MB) (1.38%)]
[23:54] !sabnzbd queue
[23:54] [SABnzbd Queue] Total Items:[23] Displaying:[3]
[23:54] [Queue Item #1] File:[Ubuntu 8.10 (Beta)] Remaining:[653.46 MB/777.79 MB]
[23:54] [Queue Item #2] File:[Kubuntu 8.04 (x64)] Remaining:[790.04 MB/790.04 MB]
[23:54] [Queue Item #3] File:[Xubuntu 8.04 (Alternate i386)] Remaining:[645.92 MB/645.92 MB]
[08:29] !sabnzbd pause
[08:29] [SABnzbd] Is now paused

[08:29] !sabnzbd resume
[08:29] [SABnzbd] Is now downloading
[08:22] !sabnzbd add http://example.com/example.nzb
[08:22] [SABnzbd] Item added successfully

[08:23] !sabnzbd add 3253283
[08:23] [SABnzbd] Item Added Successfully
[08:55] !sabnzbd speed 400
[08:55] [SABnzbd] Set speedlimit to 400KB/s

[08:55] !sabnzbd speed 0
[08:55] [SABnzbd] Removed speedlimit
[08:56] !sabnzbd version
[08:56] [SABnzbd] Script Version:[0.2] SABnzbd Version:[0.4.5]
[16:20] !nzbindex search -mi100 -ma1000 Ubuntu
[16:21] [NZBIndex] Search For:[Ubuntu] Min:[100MB] Max:[1000MB] Results:[8] Displaying:[3]
[16:21] ID:[10275218] Name:[(DVD Kubuntu 8.10 X86) [00/39] - "kubuntu-8.10 x86.nzb" yEnc] Size:[202.77 MB] Completeness:[5 files (829 / 852 parts)] Files:[1 NZB, 2 PAR2, 2 RAR] Age:[6.5 days]
[16:21] ID:[10194972] Name:[(SchiekMaan) [00/76] - "Ubuntu 810.nzb"] Size:[776.95 MB] Completeness:[77 files (2075 / 2075 parts)] Files:[1 NZB, 13 PAR2, 63 RAR] Age:[9.2 days]
[16:21] ID:[10172000] Name:[(Posted By Rom) [00/24] - "REPOST ubuntu-8.10-desktop-i386.nzb" yEnc] Size:[798.99 MB] Completeness:[25 files (3281 / 3281 parts)] Files:[1 NZB, 9 PAR2, 15 RAR] Age:[9.9 days]
The "Completeness" field is highlighted Green if the post is complete, or Red if the post is incomplete.

You can specify -n -mi or -ma
[16:22] !tvbinz search Entourage
[16:22] [TVBINZ] Results:[50] Displaying:[3]
[16:22] ID:[26791] Name:[Entourage.S05E09.720p.HDTV.X264-DIMENSION (853.6 MB)]
[16:22] ID:[26781] Name:[Entourage.S05E09.HDTV.XviD-0TV (267.5 MB)]
[16:22] ID:[25815] Name:[Entourage.S05E08.720p.HDTV.X264-DIMENSION (670.3 MB)]
[00:10] !binsearch search kubuntu
[00:11] [Binsearch] Search For:[kubuntu] Results:[9] Displaying:[3]
[00:11] ID:[30646726] Name:[(Kubuntu 8.10 i386 DVD) [00/41] - kubuntu-8.10-dvd-i386.nzb yEnc (1/7)] Size:[4.05 GB] Parts:[16904 / 16904] Files:[1 nzb, 1 par2, 1 sfv, 39 rar, 12 par] Age:[N/A]
[00:11] ID:[30637081] Name:[(DVD Kubuntu 8.10 X86) [00/39] - kubuntu-8.10 x86.nzb yEnc (1/7)] Size:[203.21 MB] Parts:[829 / 852] Files:[1 nzb, 1 sfv, 1 par2, 2 rar] Age:[N/A]
[00:11] ID:[27710269] Name:[Registreer je gratis op ****HTTP://CAVEBOX.COM****  [16/35] - CaveBox.com_kubuntu_8.04_x64.par2 yEnc Sponsored by Hitnews.eu (1/1)] Size:[788.12 MB] Parts:[1268 / 1268] Files:[6 par2, 14 rar] Age:[N/A]
[00:10] !binsearch add -nKubuntu 30646726 30637081
[00:10] [SABnzbd] Item added successfully
This would add the 2 ID's specified at the end with the NZB name "Kubuntu" to SABnzbd.
[15:48] !newzleech search kubuntu
[15:48] [Newzleech] Search For:[kubuntu] Results:[10] Displaying:[3]
[15:48] ID:[7968409] Name:[(Kubuntu 8.10 i386 DVD) [00/41] - kubuntu-8.10-dvd-i386.nzb yEnc] Size:[4.1 GB] Complete:[100.2%] Files:[54] Age:[7.2d]
[15:48] ID:[7959090] Name:[(DVD Kubuntu 8.10 X86) [00/39] - kubuntu-8.10 x86.nzb yEnc] Size:[203.7 MB] Complete:[97.3%] Files:[5] Age:[7.5d]
[15:48] ID:[6082752] Name:[Registreer je gratis op ****HTTP://CAVEBOX.COM****  [17/35] - CaveBox.com_kubuntu_8.04_x64.part01.rar yEnc Sponsored by Hitnews.eu] Size:[790.0 MB] Complete:[100%] Files:[19] Age:[115.4d]
EDIT: Updated to v0.5.
Last edited by dr0pknutz on November 10th, 2008, 9:55 pm, edited 1 time in total.
dr0pknutz
Newbie
Newbie
Posts: 7
Joined: May 6th, 2008, 8:42 pm

Re: Eggdrop TCL for SABnzbd

Post by dr0pknutz »

Updated to v0.3. You can now use the Eggdrop to search TVBINZ.net and NZBIndex.nl and add posts from those sites.
dr0pknutz
Newbie
Newbie
Posts: 7
Joined: May 6th, 2008, 8:42 pm

Re: Eggdrop TCL for SABnzbd

Post by dr0pknutz »

Updated to v0.4. You can now search Binsearch.info and add posts from there. You can add multiple collections. For instance sometimes there will be two collections for a release. 1 is the PAR2 files, the other the RAR files. If you specify both the IDs, they are combined and sent to SABnzbd. You can also specify the name of the NZB with the -n switch. Otherwise Binsearch assigns it the header name which can be extremely long.

Check out the examples in the first post.
dr0pknutz
Newbie
Newbie
Posts: 7
Joined: May 6th, 2008, 8:42 pm

Re: Eggdrop TCL for SABnzbd

Post by dr0pknutz »

Updated to v0.5. You can now search Newzleech and add multiple collections from there.

Check out the example at top of first post.
JPA
Newbie
Newbie
Posts: 9
Joined: November 20th, 2008, 12:19 pm

Re: Eggdrop TCL for SABnzbd

Post by JPA »

Great work dude, keep it up! Will come in very useful :)
jules
Newbie
Newbie
Posts: 4
Joined: December 28th, 2008, 6:27 pm

Re: Eggdrop TCL for SABnzbd

Post by jules »

hello
j' have a problem to make function this script tcl on my eggdrop to test on debian and ubuntu eggdrop in version v1.6.18+SSL
tdom version = 0.8.3
tcl version = to test with  8.3 & 8.4 & 8.5

error in search binsearch / nzbindex / etc ...

Tcl error [nzbindexTrigger]: can't read "searchStart": no such variable

the same error for all the search engines

please reply your conf for eggdrop.conf
your package installed

thank you in advance

(sorry for my bad english i'm french)
knatsch
Newbie
Newbie
Posts: 17
Joined: April 15th, 2009, 7:23 am

Re: Eggdrop TCL for SABnzbd

Post by knatsch »

Its great to see an eggdrop script here :)
An option to start/stop/restart sabnzbd would be nice. I'm thinking of controlling sabnzbd only via IRC and there will be moments where I have to shutdown sabnzbd. Once configured it should be save to set the webinterface port to 127.0.0.1 so that no one can connect to the daemon.
pepzi
Newbie
Newbie
Posts: 5
Joined: April 26th, 2009, 10:18 am

Re: Eggdrop TCL for SABnzbd

Post by pepzi »

I've added support for API key to this script. Searching does not work in this version though, I don't think it has anything to do with the changes I've made to implement API key support though. I might look in to this later. Note that this is not an "official" release.

http://www.pepzi.org/~robert/sabnzbd-0.5.1.tcl

edit: new url
Last edited by pepzi on September 10th, 2009, 4:47 pm, edited 1 time in total.
pepzi
Newbie
Newbie
Posts: 5
Joined: April 26th, 2009, 10:18 am

Re: Eggdrop TCL for SABnzbd

Post by pepzi »

knatsch wrote: Its great to see an eggdrop script here :)
An option to start/stop/restart sabnzbd would be nice. I'm thinking of controlling sabnzbd only via IRC and there will be moments where I have to shutdown sabnzbd. Once configured it should be save to set the webinterface port to 127.0.0.1 so that no one can connect to the daemon.
Version 0.4.9 and earlier only has support for shutdown in the API, so restarting it via IRC is problematic right now. Version 0.5.0 will have restart in the API and lots of other useful functions that I'm looking forward to being able to access via IRC. Hopefully dr0pknutz haven't disbanded this great script.
knatsch
Newbie
Newbie
Posts: 17
Joined: April 15th, 2009, 7:23 am

Re: Eggdrop TCL for SABnzbd

Post by knatsch »

I haven't had the time yet to upgrade to .0.49, but thanks in advance for this modification!
It's nice to hear about the upcoming features, hopefully we once see them implemented in this or a similar script :)
Tunes
Newbie
Newbie
Posts: 1
Joined: January 7th, 2011, 8:41 pm

Re: Eggdrop TCL for SABnzbd

Post by Tunes »

Hi all,
I hunted down dr0pknutz on IRC and he very kindly gave me a copy of his original 0.5 script (as link no longer works) and also a 0.6 script he was working on (based on the 0.5.1 update from pepzi), however he didn't have time to finish it.

Just from having a quick play around, I've noted that binsearch search doesn't work at all (no results) as well as the binsearch add function.
Also with nzbindex, it produces results, but doesn't give relevant ID numbers and again the add function doesn't work.
Also, putting sabnzbd in pause doesn't seem to want to play ball either (though if manually paused via web interface, the irc resume command works).

I'm going to have a stab at fixing the errors (have already solved the binsearch search issue, that now works) and will update the script here when I manage to get it to a usable state.
If anyone else notices any problems with pepzi's 0.5.1 update, please post them here too and I will have a stab at tackling them.

(apologies for bumping an old thread - but I think this script will be useful to a few people and worth the bump).
User avatar
sadnem
Newbie
Newbie
Posts: 12
Joined: November 19th, 2009, 12:16 am

Re: Eggdrop TCL for SABnzbd

Post by sadnem »

Thanks for fixing it, I'll keep an eye on this post watching for updates, I'm looking forward to see this script working at 100% of its capabilities.

EDIT: As a replacement for tvbinz and newzbin nzbs.org would be perfect.
Last edited by sadnem on January 11th, 2011, 5:57 pm, edited 1 time in total.
User avatar
renegade
Jr. Member
Jr. Member
Posts: 56
Joined: June 17th, 2010, 4:44 pm

Re: Eggdrop TCL for SABnzbd

Post by renegade »

Tunes wrote: Hi all,
I hunted down dr0pknutz on IRC and he very kindly gave me a copy of his original 0.5 script (as link no longer works) and also a 0.6 script he was working on (based on the 0.5.1 update from pepzi), however he didn't have time to finish it.

Just from having a quick play around, I've noted that binsearch search doesn't work at all (no results) as well as the binsearch add function.
Also with nzbindex, it produces results, but doesn't give relevant ID numbers and again the add function doesn't work.
Also, putting sabnzbd in pause doesn't seem to want to play ball either (though if manually paused via web interface, the irc resume command works).

I'm going to have a stab at fixing the errors (have already solved the binsearch search issue, that now works) and will update the script here when I manage to get it to a usable state.
If anyone else notices any problems with pepzi's 0.5.1 update, please post them here too and I will have a stab at tackling them.

(apologies for bumping an old thread - but I think this script will be useful to a few people and worth the bump).
Hi, just started playing with the update from papzi (0.5.1). Got everything working so far except the version trigger. I am very new to tcl so I am trying to figure it out. I assume that sabnzbd+ has changed the location of where it stores the version variable. If I manually set it in the script it works fine. I have been poking around, but cant find the location that sabnzbd+ sets it.

If possible, could you send me a .6 version of the script? Would definitely like to check it out.

Thank you.
Post Reply