Torrent Search

forum.utorrent.com

µTorrent Community

You are not logged in.

Announcement

This forum is NOT for help with anything you've downloaded! Ask for help with downloaded files and the thread will be deleted.
Posting about any illegal sharing of copyrighted content is strictly FORBIDDEN.

Want to join the Falcon beta? Get your invite here!

#1 2006-10-15 12:28:53

hiddenriver
Member

Experimental uTorrent google gadget

Edit
The Google gadget has moved. The new version of the gadget is at http://thinkpond.org/content/view/12/.


I wrote a google gadget that shows the status of all my torrents from my google home page.

To add it, go to http://www.google.com/ig, signing in if necessary. Click the link to customize your home page if you haven't done it already. Click "Add more to this page" in the top left. Click "Add by URL" to the right of the search button. Enter http://river.hidden.googlepages.com/uTorrent.xml as the URL. Click "Back to home page" in the top left. Then configure it. You'll need to enable the WebUI guest user and find out your IP address. It'll might take a while to load the first time.

Let me know what you think and I'll maybe make some improvements.

Edit
Doesn't work in Internet Explorer! And it probably never will. Sorry.


http://thinkpond.org/images/stories/utorrent/utorrent_gadget.gif

Edit (Ultima): Adding XML source in case the link ever goes down...

Code:

<iframe id="torrent_frame_0" width=0 height=0 scrolling=auto marginwidth=0 marginheight=0 frameborder=0 src=""></iframe> <iframe id="torrent_frame_1" width=0 height=0 scrolling=auto marginwidth=0 marginheight=0 frameborder=0 src=""></iframe> <script type="text/javascript"> var prefs = new _IG_Prefs(__MODULE_ID__); var address = prefs.getString("address"); var port = prefs.getInt("port"); var guest = prefs.getString("guest"); var period = prefs.getInt("period"); var guestUrl = "http://" + guest + "@" + address + ":" + port + "/gui/guest.html"; // document.write("<iframe id=\"torrent_frame\" width=100% height=100% scrolling=auto marginwidth=0 marginheight=0 frameborder=0 src=\"" + guestUrl + "\"></iframe>"); var currentFrameIdx = 0; function hideFrame(frameIdx) { var frame = _gel("torrent_frame_" + frameIdx); frame.width = 0; frame.height = 0; } function showFrame(frameIdx) { var frame = _gel("torrent_frame_" + frameIdx); frame.width = "100%"; frame.height = "100%"; } function refreshFrame(frameIdx) { var frame = _gel("torrent_frame_" + frameIdx); frame.src = guestUrl; } function handleTimeout() { var otherFrameIdx = 1 - currentFrameIdx; hideFrame(currentFrameIdx); showFrame(otherFrameIdx); refreshFrame(currentFrameIdx); currentFrameIdx = otherFrameIdx; window.setTimeout('handleTimeout()', period * 60 * 1000); } showFrame(1 - currentFrameIdx); refreshFrame(1 - currentFrameIdx); window.setTimeout('handleTimeout()', period * 60 * 1000); </script>

Last edited by Ultima (2007-09-26 19:15:21)

Offline

 

#2 2006-10-15 13:16:36

muwa
Member

Re: Experimental uTorrent google gadget

Good job. Tried it with Google Pages and it works great. Thanks

Offline

 

#3 2006-10-15 14:22:02

Ultima
Administrator

Re: Experimental uTorrent google gadget

Now that is an interesting idea =o

Offline

 

#4 2006-10-16 02:03:06

Conrad Poohs
Member

Re: Experimental uTorrent google gadget

Very cool idea!

I hope you don't mind, but I grabbed your source code and made a few improvement:
-Title changed to "µTorrent"
-Added: "Admin Login" setting, which is used to link gadget title to full WebUI
-Added: Show: 5/10/20/40 Torrents setting
-Shortened other option labels to avoid text wrapping @ 1024 screen resolution

http://conradpoohs.com/uTorrent.xml

If you want to host this version, I'll take it off my webspace to avoid confusing others.

Offline

 

#5 2006-10-16 05:25:51

ICleolion
Member

Re: Experimental uTorrent google gadget

Very nice, thanks for this.  The amount of webui inspired add-ons is growing nicely smile

We are gonna need that extra sub forum soon Firon tongue

Last edited by ICleolion (2006-10-16 05:26:13)


One of these days... POW RIGHT IN THE KISSER

Offline

 

#6 2006-10-16 08:17:34

hiddenriver
Member

Re: Experimental uTorrent google gadget

Thanks Conrad. I made a few cosmetic changes and updated the version I'm hosting. The most important change was adding your name as a contributor! I don't mind you hosting it, in fact I bet your server is more reliable than google pages! But I do intend to make more changes in the future and there is no need for the code to fork. If it ever gets popular, maybe I'll find somewhere more central to host it. Thanks again.

Offline

 

#7 2006-10-16 08:37:23

Ultima
Administrator

Re: Experimental uTorrent google gadget

You could always place everything in webui.zip, and access it via http://IP:port/gui/uTorrent.xml tongue

Or if your files conflict, place it in a subdirectory of webui.zip, so that you access it via http://IP:port/gui/googlegadget/uTorrent.xml

Or something like that anyway. It makes sense too that way, since µTorrent has to be running for it to work. Of course, that means tiny modification with regards to login and stuff, but at least it sorta decentralizes everything.

Last edited by Ultima (2006-10-16 08:46:29)

Offline

 

#8 2006-10-16 12:11:49

hiddenriver
Member

Re: Experimental uTorrent google gadget

That's an interesting idea Ultima. I wouldn't have thought of that. There's at least one problem I think of. Google won't connect to a server using a username or password and the WebUI guest account still requires that you enter a username. If that was changed it should work though.

That's why the google gadget embeds the WebUI in a frame. The javascript security model prevents it from connecting to the utorrent server directly and it can't do it through the google content fetch system because of the username. If the username was removed, the gadget could ask google to fetch the WebUI page for it and then do stuff with the result, like remove columns that don't fit in a google gadget screen area and size the gadget automatically based on the number of torrents. It could also do stuff like notify you when torrents complete and a bunch of other stuff. Just an idea smile

Another useful feature for doing this kind of think would be an XML description of the torrents. HTML is okay but its more difficult to parse and it's likely to change with future versions of utorrent.

Offline

 

#9 2006-10-16 12:29:10

Alpha-Toxic
Member

Re: Experimental uTorrent google gadget

hmmm...
have u tried enabling the guest account in uT? Perhaps if u use a blank username for the guest account u *may* get round google's limits.

Offline

 

#10 2006-10-16 12:31:55

Ultima
Administrator

Re: Experimental uTorrent google gadget

Nope, I doubt that'd work, as the guest name can't be blank.

@hiddenriver: That's what I was afraid of... grr... (I don't use google.com/ig, which is why I wasn't sure tongue) So it doesn't work even with http://guestname@IP:post/gui/uTorrent.xml ?

Last edited by Ultima (2006-10-16 13:02:01)

Offline

 

#11 2006-10-16 12:37:29

Alpha-Toxic
Member

Re: Experimental uTorrent google gadget

lol, i knew i shoud try it first

Offline

 

#12 2006-10-16 18:55:31

hiddenriver
Member

Re: Experimental uTorrent google gadget

Ultima: actually there's a chance it will work. I know for sure that the google gadget API does not allow you to fetch data from a username / protected site (because that was the first thing I tried!) But it may be possible for google to download the gadget xml with a username / password. I'll try that when I get a chance... I give it 50/50 smile

Edit
I don't think it works. I was able to put uTorrent.xml into WebUI.xml and view it in firefox locally with http://user:pass@address:port/gui/uTorrent.xml. I verified that the port was open on my firewall and tried the same URL with google and it said it couldn't download it. I tried using port 80 in case it didn't like unusual ports. Didn't work sad I'm pretty sure it just doesn't like URLs with a username or password and I can understand why!

Last edited by hiddenriver (2006-10-16 20:00:41)

Offline

 

#13 2006-10-16 21:47:29

Ultima
Administrator

Re: Experimental uTorrent google gadget

Aw... Oh well, worth the try, at least tongue

Offline

 

#14 2006-10-17 01:16:02

zman3
Member

Re: Experimental uTorrent google gadget

ok kill me if you want but the web ui works in ie7 and this does not anything i can do to the code ?

EDIT:
I'm hosting the xml on my own server so i can make changes

Last edited by zman3 (2006-10-17 01:18:46)

Offline

 

#15 2006-10-17 01:47:32

Conrad Poohs
Member

Re: Experimental uTorrent google gadget

zman3: IE7 (like IE6) doesn't support username@host URLs.  Microsoft disabled it a year or two ago after some security issues.  Unfortunately, they don't offer any alternative way to send a username as part of an URL.

If you're lucky, the release version of WebUI might have an option to allow guest access without an account.

Offline

 

#16 2006-10-17 04:30:29

zman3
Member

Re: Experimental uTorrent google gadget

well how annoying of microsoft lol thanks

Offline

 

#17 2006-10-17 06:23:08

Lord Alderaan
Member

Re: Experimental uTorrent google gadget

During my mIRCscripting I did some research and found out that a http authorization (a username:password in a url) is sent as part of the request header to the web server as:

Code:

Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=

Where dXNlcm5hbWU6cGFzc3dvcmQ= is the base64 encoded username:password

Website that encodes/decodes base64:
http://makcoder.sourceforge.net/demo/ba … e:password

I dunno if you can send custom headers and if its posible to encode base64 on the fly. In fact I know nothing about google gadgets but maybe it helps with the IE support...

Last edited by Lord Alderaan (2006-10-17 06:25:44)


-= FAQ Guides Manual Help =-
Everything about the Webui!

Offline

 

#18 2006-10-17 08:32:32

hiddenriver
Member

Re: Experimental uTorrent google gadget

There's no way of adding a header to the HTTP request unfortunately. The only hope for IE support is Microsoft reinstating username:password@ in urls or an option to disable authentication for guests in WebUI.

Offline

 

#19 2006-10-17 11:12:49

ICleolion
Member

Re: Experimental uTorrent google gadget

IE support for those users who really want it

http://forum.utorrent.com/viewtopic.php?id=14600


One of these days... POW RIGHT IN THE KISSER

Offline

 

#20 2006-10-22 05:14:35

AnonymousOne
Member

Re: Experimental uTorrent google gadget

This is from a friend of mine GECS @ www.bitspyder.net .... he added this to a post of mine when I told everyone about the new WebUI

---------
If you are going to use this syntax http://user:pass@host.domin and you use IE6 then you have to be sure that you have disabled the security that prohibits this syntax.

”How to disable the new default behavior for handling user information in HTTP or HTTPS URLs
To disable the new default behavior in Windows Explorer and Internet Explorer, create iexplore.exe and explorer.exe DWORD values in one of the following registry keys and set their value data to 0.
For all users of the program, set the value in the following registry key:

HKEY_LOCAL_MACHINESoftwareMicrosoftInternet   ExplorerMainFeatureControlFEATURE_HTTP_USERNAME_PASSWORD_DISABLE
For the current user of the program only, set the value in the following registry key:
HKEY_CURRENT_USERSoftwareMicrosoftInternet ExplorerMainFeatureControlFEATURE_HTTP_USERNAME_PASSWORD_DISABLE”

Source : http://support.microsoft.com/kb/834489/en-us

Offline

 

#21 2006-10-22 06:22:21

Ultima
Administrator

Re: Experimental uTorrent google gadget

Yeah, mentioned a while ago, but that problem isn't the issue at hand. The problems is that Google doesn't accept those kinds of URLs in the first place, which makes attempting to log in in that fashion rather useless.

Last edited by Ultima (2006-10-22 06:22:37)

Offline

 

#22 2006-10-22 13:31:01

mcdjork
Member

Re: Experimental uTorrent google gadget

Does anyone who knows how feel like adding a feature in the settings that lets you choose whether you want to display downloading, uploading, all or active torrents? I'm seeding too many to display them all, and if I were to just be able to see the active torrents, this gadget would be far more useful. Thanks!

Offline

 

#23 2006-10-22 15:27:08

AnonymousOne
Member

Re: Experimental uTorrent google gadget

I have never used google so I don't know the benifits of it ...  but what I did do was use my Windows Active desktop.   You can put about 4 or 5 different web pages/sites in as your wall paper ...  works great ...   If you leave user name and password blank it will prompt you for it when the page loads / computer boots.

Win XP
---------
Right click on desktop
Click properties
Click Desktop tab
at bottom click Customize Desktop
click Web tab
Click NEW
Put in any web page / site you want such as http://address:port/gui/guest.html or http://address:port/gui/uTorrent.xml
Click OK
"add item to active desktop?"   Click OK   or  click customize to enter in a username and pass. (guest account doesn't work because password is required)
Once entered it will try to sync the page first ... this will fail if you did not use a username and password.  That is OK.
Click OK
Click ok
etc ...

Blank Page will appear on screen and then a prompt for username and password.
Once user info is entered it will work normally.

To refresh your stats ... right click on anything ... a pop up list will appear  ... click refresh.

I sort my torrents by clicking the DONE colum.  It may seem that it doesn't work .. but in a few seconds the colum will be sorted .. I like the 0% at the top and the 100% at the bottom but you set it how you like :-)

Another page I like to have in my active desktop is
http://www.celebscentral.net/spreadtheword.asp
Use the right click refresh to change pics
Use right click open in a new window to see pic in full.


Anon
www.bitspyder.net
best e-Learning only tracker

Offline

 

#24 2006-11-19 19:24:53

hiddenriver
Member

Re: Experimental uTorrent google gadget

I finally put together a site to host the utorrent Google gadget together with some instructions. The newest version is at http://thinkpond.org/content/view/12/. If you're using the old one I originally posted here, don't worry it will continue to work!

Offline

 

#25 2006-12-10 15:40:17

SpookyET
Member

Re: Experimental uTorrent google gadget

A Netvibes module would be cool.

Offline

 

Board footer

Powered by FluxBB