Jump to content

New Firefox add-on


lithopsian

Recommended Posts

I've written a Firefox add-on for the Linux server. It is designed to show summary information and a brief torrent list inside Firefox with minimal resource usage. There are also commands for pausing and unpausing all torrents without opening the full WebUI.

https://addons.mozilla.org/en-US/firefox/addon/torrent-status-tool/

Let me know what you think.

Link to comment
Share on other sites

  • Replies 88
  • Created
  • Last Reply
I've written a Firefox add-on for the Linux server. It is designed to show summary information and a brief torrent list inside Firefox with minimal resource usage. There are also commands for pausing and unpausing all torrents without opening the full WebUI.

https://addons.mozilla.org/en-US/firefox/addon/244867/

Let me know what you think.

Works! But I don't need it.

Link to comment
Share on other sites

Thanks for the feedback. Good to know it doesn't totally bork on other machines.

Can You add a feature? On right-click on .torrent URL, there will be posibility to "Send to WebUI".

That will be great if I would not have to go through all that download the torrent file then go to the WebUI and then add a torrent then find the torrent to add. Just a right click and add torrent to WebUI.

Sorry, but my English is very poor, i hope you know what i meen?

Link to comment
Share on other sites

You should look at this addon:

https://addons.mozilla.org/en-US/firefox/addon/53869/

It is called Send to WebUI :) I think it does exactly what you want, which is part of the reason my own addon doesn't do it. It is in English, Russian, or German. It only works on actual torrent files, not magnet links.

I have written a protocol handler which currently handles magnet links and sends them to uTorrent, so you just have to click a trackerless torrent and it will be in uTorrent. I am testing and trying to decide just what feedback there should be when you click a link. I will experiment with seeing if it can be extended to ".torrent" files also. I haven't decided whether it will go into this addon or a new one.

Or you might want to add a shell script to associate with magnet links or torrent files. Here is an example:

#!/bin/bash

# Get token
export token=$(curl -G -s -c ~/.utorrent/ucookie.txt -n http://192.168.0.4:8080/gui/token.html|sed
's/<[^<>]*>//g')
# echo $token

# Add URL
curl -G -s -n -b ~/.utorrent/ucookie.txt -d token=$token -d action=add-url -d s="$1" http://192.168
.0.4:8080/gui/

The admin username and password must be placed in ~/.netrc, or you could hardcode them into the shell script if security isn't an issue for you.

Link to comment
Share on other sites

I caved to pressure and added handlers so that magnet links and torrent files are automatically sent to utserver, subject to preferences being set. Either or both can be disabled and behaviour will revert to any external handlers you have configured, or to saving the file.

Link to comment
Share on other sites

  • 3 weeks later...

If you have version 0.0.3, the latest at Mozilla, you can click on any torrent file or magnet link and it will be sent to uTorrent automatically. Check in the options for whether these are enabled and whether you get confirmation that the torrent was added. If the handler is enabled, but your click did not succeed you will always get a message, for example if uTorrent is not running. If the handlers are disabled then the default Firefox action will happen when you click, such as a file download. Either way, uTorrent will create a .torrent file for you in your configured directory.

There are currently no options on the Firefox context menu to add a torrent. These are available with a separate extension. Do people really want this feature duplicated in my addon?

Version 0.0.4 will be going up soon, with a toolbar button that you can customise to any toolbar. The existing statusbar button remains but can be turned off if you want the button elsewhere. Status bar icons will be dropped from Firefox soon, possibly as early as the 4.0 release, but certainly by the next release after that.

Link to comment
Share on other sites

In all honesty i prefer your add on to the other one you mentioned... so yes it would be nice if it was added as it saves me 3 clicks...

I don't use the UT gui on my home computer so everything is done via webui to the server... i click torrent it downloads to downloads folder on local machine i then select add torrent in webui which then adds it to UT on server.

I also usually have multiple FF windows open with over 60 tabs between then so the icon in the status bar lets me check on things on the fly with out having to hunt down the webui tab i have open so with the added option of add of adding a torrent to the server it would be most handy :)

Link to comment
Share on other sites

i click torrent it downloads to downloads folder on local machine i then select add torrent in webui which then adds it to UT on server.

That's a pain, isn't it! I'm still curious if you have version 0.0.3 of the add-on? If so, it should actually do everything for you automatically when you click on a torrent file. I much prefer this to right-clicking and then clicking another option to send to uTorrent, and I thought other people would to. No?

If this doesn't work, first check the preferences to see that you have it configured to handle torrent files for you. If it still doesn't work, I'd like to know so I can fix it. Feedback is good, it helps to know how people are using the add-on, what extra would be good, what isn't needed, etc.

Just thinking of you situation, I've recently added functions for middle-clicking, ctrl-clicking, etc. on the icon to open the webui in new tabs and new windows,etc (not uploaded yet). Perhaps a type of click to focus an existing webui tab would be helpful? This is built in to the urlbar dropdown in FF4, but it is kind of flaky.

Link to comment
Share on other sites

My addon will send the torrent URL (file or magnet link) to the server that you are configured to monitor, presumably your remote server. The .torrent file will be created wherever you have utserver configured to keep such things. The torrent file is actually created by utserver itself. Firefox doesn't download the file and it never exists on your local machine.

Should be easy enough to test anyway. Click a link and see if the torrent appears where you expect. You might want to try this at first with confirmations enabled, so at least you get an alert that everything happened as expected on the Firefox side. The only worrying thing is if a torrent file downloads right now when you (left) click it then clearly the add-on isn't doing what it is supposed to.

Link to comment
Share on other sites

Ok tested it, enabled the options mentioned, clicked on link, got msg saying it had been added to UT, checked on server and it is not there.

I looked in all my UT related folders and there was nada, had a look about in case it was dumped else where still nothing so it appearsto be not doing as requested but reporting it is?

Linux i686; Ubuntu/10.10 (maverick) Firefox/3.6.12 ( .NET CLR 3.5.30729; .NET4.0C)

Link to comment
Share on other sites

Tricky. The confirmation alert shows (should show!) that utserver sent back an HTTP 200 success code to the add request, so I suspect something in your uTorrent configuration is failing to download and install the torrent file. I don't know what could be wrong since you can add torrents manually with the add file dialog.

Which build of utserver are you running? I haven't tested this with all of them, but have with two different builds.

Can you add a torrent URL from the webui? Click the icon of the globe with the plus sign on the left of the toolbar. You might have to install the latest 380 webui to get that option. That is essentially the same function that my addon performs, with no file ever touching your home machine.

Link to comment
Share on other sites

  • 1 month later...

It has come to my attention that clicking torrent files doesn't always get them added to uTorrent. When the server adds a content-disposition header, Firefox just goes ahead and downloads the file (or asks for an external application) without consulting it's internal handlers (meaning my extension!). An example of a site that does this is btmon.com. I didn't hit this problem with the sites I use and tested with, but I'm sure other people must have hit it. Just none of them told me :)

I'm working on a solution that is clean and simple to use. Until then the workarounds are to click magnet links (trackerless torrents) which should always work, manually add using the webui, or use one of the other Firefox extensions which add torrents using a context menu or drag'n'drop.

Link to comment
Share on other sites

  • 2 months later...

I'm using FF 3.6.14 on Ubuntu 10.04. I installed the add-on v0.1.2 but it's not working for me. The add-on install OK and I can access the options by right-clicking on the icon, but the icon remains greyed out and I can't access the server webui. I have uTorrent running on the local machine and also on a server on the local network but I cannot get it to connect to either. If I point FF at the uTorrent server I can access the webui OK, I just can't use the add-on.

I've tried it with uTorrent 20100902 - Revision 21701 and 20110118 - Revision 24118 (current).

Any ideas appreciated.

Link to comment
Share on other sites

Do you have the correct settings on the options server tab?

If so, do you see any messages in the error console?

Well, it's the correct IP address for the server. Unless I'm overlooking something simple?

utserver_addon.jpg

The only error that appears when I open the addon's settings dialog box is:

Warning: Empty string passed to getElementById().

Thanks.

Link to comment
Share on other sites

That's a tricky one. If the webui connects then I can't think of anything that should stop the extension from connecting. Other than the obvious IP, port, and login configuration. The error log wouldn't show anything when you open the options, but if you change something related to connecting to the server then it will attempt to reconnect and you might see something in the console. Only significant errors will show, there is no debugging code activated in the release version.

Can you try selecting the Use Password Manager option. That can make it a little easier to troubleshoot because it will prompt you for a password if it connects but needs authentication. Do this in a new browser without connecting to the webui.

Link to comment
Share on other sites

I checked the Use Password Manager option, then closed and restarted FF. I then get a login box for the uTorrent server. If I login, nothing happens. If I add the default user 'admin' to the addon settings, I don't get the login box when FF starts, but still no connection. The addon icon is still greyed out.

Link to comment
Share on other sites

I've uploaded a 0.1.3beta version which includes some debugging code. If you run it you should get the HTTP response status in the extensions.uTorrent.error preference. Also the related text message in uTorrent.status and the server connection string in uTorrent.request. I might need to add more debugging code, perhaps tracking the token and cookies.

https://addons.mozilla.org/en-US/firefox/addon/torrent-status-tool/versions/

Link to comment
Share on other sites

Interesting. None of these errors are actually the error itself, but are all caused by the debugging code. The first one is caused when the extensions tries to report the HTTP status following a network error and is a known "bug" in Firefox. What line number is it showing against? Not line 62, I think?

So there is a "network" error, which could be quite a few things. Presumably not a hostname problem if it is direct to an IP address. Connection rejected? What does the preference extensions.uTorrent.request contain? It should show the address used for the request.

This error is also reported to occur when certain other network activity occurs. Could there be other extensions making XML/HTTP requests at the same time as this one?

I hope this isn't too much trouble for you. I would like to fix any bug that might be happening. I know that for every person like you that lets me know of a problem there are probably 10 more that just throw away the extension.

Link to comment
Share on other sites

What line number is it showing against? Not line 62, I think?

It's line 625. I don't know why the forum doesn't show the entire image.

What does the preference extensions.uTorrent.request contain? It should show the address used for the request.

I could not find a preference extensions.uTorrent.request. Where would that be?

I hope this isn't too much trouble for you. I would like to fix any bug that might be happening. I know that for every person like you that lets me know of a problem there are probably 10 more that just throw away the extension.

No trouble. I appreciate you trying to help.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...