Page 3 of 3
Re: SABnzbd stats script for XChat (linux)
Posted: July 2nd, 2009, 10:22 am
by lommes
the adress it calls for gathering the information is autogenerated. entering your host and port will result in something like http://yourhost:yourport the /sabnzbd/ is apended by default.
so in your case host should be 192.168.0.120 and port 8090 what will end up in a line like
http://192.168.0.120:8090/sabnzbd/
Whats your SABnzbd+ version and/or did you enter the right 32 digit api key?
speed and so on is taken from the api/xml output and the url includes the apikey. if you're using a version <0.4.9 it may work with an empty apikey (remove the xxxxxxxx in that case)
Re: SABnzbd stats script for XChat (linux)
Posted: July 2nd, 2009, 12:21 pm
by Shadowtester
I am currently using 4.7 I was going to be updating over the next couple of days during the holiday now that my Usenet que is finally empty and I have removed the xxxxxxxx from the api key but still getting the same error about not being able to retrieve the data from 192.168.0.120. The output I was seeing in xchat with just the 192.168.0.120 in the host and the 8090 in the port was not showing the directory it was just 192.168.0.120:8090
Re: SABnzbd stats script for XChat (linux)
Posted: July 2nd, 2009, 12:41 pm
by lommes
not seeing the directory is because of the wget error message which only returns the server.
try
http://192.168.0.120:8090/sabnzbd/api?m ... output=xml in your browser, if that works try
http://192.168.0.120:8090/sabnzbd/api?m ... ml&apikey= to check if the error is because of the apikey which is not needed.
if it works without the apikey tell me and i will fix it.
if it works without the &apikey= at the end, you may try the file linked below. Just replace the existing sabgetdata file in your ~/.xchat2 directory and enter your data again
< 0.4.9 testing
this will check if an apikey is entered, if not no apikey will appended, same goes for username and password, like jcfp suggested below
Re: SABnzbd stats script for XChat (linux)
Posted: July 2nd, 2009, 2:48 pm
by jcfp
lommes wrote:
if it works without the &apikey= at the end
Probably the wget request results in similar errors as those described in this report:
http://trac2.assembla.com/SABnzbd/ticket/87 - only this time when sending the apikey var, which for obvious reasons is unknown to 0.4.7. Which could indeed be worked around by omitting apikey.
Re: SABnzbd stats script for XChat (linux)
Posted: July 3rd, 2009, 8:40 am
by Shadowtester
http://192.168.0.120:8090/sabnzbd/api?m ... output=xml
Code: Select all
<queue>
<paused>False</paused>
<kbpersec>0.0</kbpersec>
<mbleft>0.0</mbleft>
<mb>0.0</mb>
<noofslots>0</noofslots>
<diskspace1>156.115810394</diskspace1>
<diskspace2>156.115810394</diskspace2>
<timeleft>0:00:00</timeleft>
<jobs>
</jobs>
</queue>
http://192.168.0.120:8090/sabnzbd/api?m ... ml&apikey=
Code: Select all
500 Internal error
The server encountered an unexpected condition which prevented it from fulfilling the request.
Traceback (most recent call last):
File "/usr/local/src/SABnzbd/cherrypy/_cphttptools.py", line 126, in _run
applyFilters('before_finalize')
File "/usr/local/src/SABnzbd/cherrypy/filters/__init__.py", line 151, in applyFilters
method()
File "/usr/local/src/SABnzbd/sabnzbd/interface.py", line 232, in beforeFinalize
cherrypy.response.body = rsrc.callable(rsrc.instance,
TypeError: api() got an unexpected keyword argument 'apikey'
sorry I could not reply sooner was at work and could not access the browser on my local network at home yesterday and last night had family come into town for the holiday so was away from the computer all night.
Re: SABnzbd stats script for XChat (linux)
Posted: July 3rd, 2009, 8:52 am
by Shadowtester
The new testing file worked great thank you
Re: SABnzbd stats script for XChat (linux)
Posted: July 3rd, 2009, 9:50 am
by lommes
thx for reporting back! will be in the next release.
Re: SABnzbd stats script for XChat (linux)
Posted: July 5th, 2009, 11:06 am
by lommes
Download see first reply
0.61
* changed apikey handling, so versions < 0.4.9 are supported
Re: SABnzbd stats script for XChat (linux)
Posted: July 5th, 2009, 1:52 pm
by fredlkrue
i get this output in xchat on the latest version: Current Speed: api?mode=qstatus&output=xml&apikey=(my key here) ....
another request, since you added the "remaining size of the current download", i want to change the color, so it should be best if it can be done in sab.tcl instead of getsabdata...
EDIT: forgot to mention that your package contains the backup files (~filename), please remove them. I know they are small but makes a smaller package
Re: SABnzbd stats script for XChat (linux)
Posted: July 5th, 2009, 2:31 pm
by lommes
fredlkrue wrote:
i get this output in xchat on the latest version: Current Speed: api?mode=qstatus&output=xml&apikey=(my key here) ....
another request, since you added the "remaining size of the current download", i want to change the color, so it should be best if it can be done in sab.tcl instead of getsabdata...
EDIT: forgot to mention that your package contains the backup files (~filename), please remove them. I know they are small but makes a smaller package
sorry about that!
fixed now.
0.62
* fixed an error in the ouput of speed
* moved "Remaing:" in the silent nzb output from sabgetdata to the tcl
Re: SABnzbd stats script for XChat (linux)
Posted: July 5th, 2009, 3:20 pm
by fredlkrue
Thanks for the fast reply/fix, so far is working great
Re: SABnzbd stats script for XChat (linux)
Posted: September 18th, 2009, 4:21 pm
by lommes
simple Python recode:
- should work with win/linux xchat (if xchat < 2.0 extra python stuff is needed), windows needs python installed in a folder c:\python25 even if the python version is 2.6 or above, otherwise XChat will complain !!!
- less options (more to come with SABnzbd+ 0.5), but only one single file
- edit host, port, apikey, user and password in sab.py to your needs
- load from XChat or move to XChatdir to autoload on startup
- /sab spams
current speed,
queuesize and
ETA
- /sabe same but simple print, so no spam
download
hf
Re: SABnzbd stats script for XChat (linux)
Posted: September 18th, 2009, 5:05 pm
by fredlkrue
Nice, thanks a lot
Re: SABnzbd stats script for XChat (linux)
Posted: November 13th, 2009, 6:47 pm
by lommes
small update
- fixed bug where same data was displayed all the time
- should work with
trunk and
0.5 now
download
Re: SABnzbd stats script for XChat (linux)
Posted: November 14th, 2009, 10:53 am
by fredlkrue
Many thanks.