Page 1 of 2

Desktop widget: SABnzbd Status

Posted: March 5th, 2008, 1:08 pm
by qwerty967
http://widgets.opera.com/widget/9291/

This cross-platform widget was developed with jQuery and Flot, and it requires Opera. The only thing is that the widget can't access localhost, a fact that I discovered when I was nearly finished developing it. It works fine with remote computers on the LAN and the internet.

If you use a Mac, try the Dashboard widget.

Re: Desktop widget: SABnzbd Status

Posted: March 5th, 2008, 1:21 pm
by DeXeS
Looks cool! thanx! going to try it :D

I don't have sab run localy so I have no problems  :D but can it also not connect to the hostname from the local pc? or forward sab to the internet and then connect from your outside internet IP

Re: Desktop widget: SABnzbd Status

Posted: March 5th, 2008, 1:53 pm
by silversum
I'm not able to get it working.  I have sabnzbd running at home, and am able to view it in my browser no problem, but the widget is empty and refreshing it does nothing. 

If I click on 'Currently Downloading: Nothing' it even opens up a tab with info on what is currently downloading.

I'm using Opera 9.50b 9770 (any beta after has a bug where clicking on a link with an anchor won't go to the anchor, just the top of the page).

edit - Sorry, should have put more info.  0.3.0 in plush interface.

Re: Desktop widget: SABnzbd Status

Posted: March 5th, 2008, 2:02 pm
by neilt0
That's really nice! Well done.

Some questions:

1) Can you add authentication: this doesn't work if you've password protected SAB's web interface (which you need to do if you use SAB over the internet)

2) Can you resize the window?

3) Can you fix the scale to a set bandwidth level so the graph scale doesn't dynamically change so much? e.g. I'd like to set the scale at 2000 kbps or 1100kbps.

4) Can the widget run without loading the entire Opera browser?

5) Can I open multiple instances of the widget with different connections to different machines? I have up to 3 machines downloading with SAB.

6) Can you show unpacking status?

Thanks!

Re: Desktop widget: SABnzbd Status

Posted: March 5th, 2008, 2:02 pm
by qwerty967
silversum wrote: I'm not able to get it working.
Are there any errors in the Error Console (Tools>Advanced>Error Console)?

Re: Desktop widget: SABnzbd Status

Posted: March 5th, 2008, 2:14 pm
by qwerty967
neilt0 wrote: Some questions:
1) Sure. I assume http://username:password@host:8080/sabn ... utput=json will work. I will update the widget accordingly. It seems authentication is done with HTML forms. Log in first in Opera, then the widget should be able to connect.

2) You can resize it the same way you would zoom in on a page in Opera. In Opera 9.5, press ctrl+plus or ctrl+minus.

3) I think I'll make the bottom of the y-axis zero so that it won't dynamically scale too much.

4) For the widget to work, Opera needs to remain open, but you can easily hide the main window to the notification area. On a related topic, it shouldn't be too difficult to port to Dashboard or Windows Sidebar.

5) It's possible to install widgets multiple times.

6) The widget is reading whatever the json feed is providing. This request should go to the main developers.

Re: Desktop widget: SABnzbd Status

Posted: March 5th, 2008, 2:14 pm
by silversum
qwerty967 wrote:
silversum wrote: I'm not able to get it working.
Are there any errors in the Error Console (Tools>Advanced>Error Console)?
these:

Code: Select all

JavaScript - widget://localhost/C:/Program%20Files/Opera%209.5b/profile/widgets/SABnzbd%20Status_9291_1.0.wgt/jquery.blockUI.js
Linked script not loaded

Re: Desktop widget: SABnzbd Status

Posted: March 5th, 2008, 2:23 pm
by qwerty967
silversum wrote: these:

Code: Select all

JavaScript - widget://localhost/C:/Program%20Files/Opera%209.5b/profile/widgets/SABnzbd%20Status_9291_1.0.wgt/jquery.blockUI.js
Linked script not loaded
Just to make sure, you're not connecting to localhost or 127.0.0.1, right?

Re: Desktop widget: SABnzbd Status

Posted: March 5th, 2008, 2:34 pm
by silversum
Nope, I'm at work trying to connect to the service at home.  The web interface is working fine.


edit - as it's a remote connection I require authentication.  Maybe that's the problem!
edit2 - i have been authenticating myself on the web interface before I load the widget, if that helps.

Re: Desktop widget: SABnzbd Status

Posted: March 5th, 2008, 2:39 pm
by neilt0
1) Sure. I assume http://username:password@host:8080/sabn ... utput=json will work. I will update the widget accordingly.

I've had to use: http://machine:port/sabnzbd/?ma_username=xxxx&ma_password=yyyy in the past, not sure if the other will work.

2) You can resize it the same way you would zoom in on a page in Opera. In Opera 9.5, press ctrl+plus or ctrl+minus.

I meant resize as in change the size of the widget by dragging a window edge, not zooming in.

3) I think I'll make the bottom of the y-axis zero so that it won't dynamically scale too much.

That'd work for me.

4) For the widget to work, Opera needs to remain open, but you can easily hide the main window to the notification area. On a related topic, it shouldn't be too difficult to port to Dashboard or Windows Sidebar.

How do you hide it? Can't find a menu option in Opera and help for "hide" shows nothing. I don't normally use opera.

5) It's possible to install widgets multiple times.

Oh yes, that worked. Cool.

6) The widget is reading whatever the json feed is providing. This request should go to the main developers.

OK. Thanks for your quick reply.

Re: Desktop widget: SABnzbd Status

Posted: March 5th, 2008, 2:50 pm
by neilt0
Occasionally, the graph is broken (upside down). PNG attached.

This also shows that the Status widget works for 2 machines simultaneously. Cool!

Re: Desktop widget: SABnzbd Status

Posted: March 5th, 2008, 3:43 pm
by qwerty967
Thanks for the feedback everyone.

Neilt0: I experienced that graphing bug with Opera 9.25 and Ubuntu. Using Opera 9.5b1 might solve the problem, because I don't see that bug with Opera 9.5b and Vista. Opera 9.5b1 (b9613 released October 2007) is very stable and includes very welcome updates. Also, zooming in and out will resize the entire widget. You can hide Opera by right-clicking the Opera icon in the notification area and selecting Hide Opera.

Silversum: For now, logging in before launching the widget is required. If you have been doing this, maybe you fiddled with the cookie settings?

Re: Desktop widget: SABnzbd Status

Posted: March 6th, 2008, 1:48 am
by neilt0
qwerty967 wrote: Neilt0: I experienced that graphing bug with Opera 9.25 and Ubuntu. Using Opera 9.5b1 might solve the problem, because I don't see that bug with Opera 9.5b and Vista. Opera 9.5b1 (b9613 released October 2007) is very stable and includes very welcome updates. Also, zooming in and out will resize the entire widget. You can hide Opera by right-clicking the Opera icon in the notification area and selecting Hide Opera.
Hiding like that only works with the Opera 9.5 you linked to, so if you are installing Opera just for this widget, like me, that's the version you should use.

Re: Desktop widget: SABnzbd Status

Posted: March 6th, 2008, 1:52 am
by neilt0
pair of dimes wrote: What happens when I close Opera, and open it back again? Will all the multiple widgets remain? Can you show/hide them all at once easily?
The widgets reopen when you reload Opera. To hide them, closing Opera is probably the easiest and quickest solution.

Re: Desktop widget: SABnzbd Status

Posted: March 6th, 2008, 3:06 pm
by qwerty967
I've updated the widget to support authentication and fix a few bugs. There is a link to a preview version in the first post of this thread to the updated widget. If there are no issues, I'm going to upload it to the Opera widgets site tomorrow. It will take a few days to get approved.