MozillaZine

Torrent Status (old addon, new name)

Announce and Discuss the Latest Theme and Extension Releases.
lithopsian
 
Posts: 3663
Joined: September 15th, 2010, 9:03 am

Post Posted July 28th, 2015, 4:00 pm

Now magnet links should work. If you want to experiment with multiprocess mode, switch to the latest beta version. Or just try it out for fun.

RXWatcher
 
Posts: 1
Joined: August 17th, 2015, 6:01 pm

Post Posted August 17th, 2015, 6:05 pm

Hi, would you consider making a rtorrent or rutorrent option?
We (rutorrent people) really need a plugin that works reliably. I havent found one yet that actually works with 'labels' correctly.

Thanks for your time and hard work!

-Jim

lithopsian
 
Posts: 3663
Joined: September 15th, 2010, 9:03 am

Post Posted August 19th, 2015, 7:42 am

RXWatcher wrote:Hi, would you consider making a rtorrent or rutorrent option?
We (rutorrent people) really need a plugin that works reliably. I havent found one yet that actually works with 'labels' correctly.

Thanks for your time and hard work!

-Jim

I've looked into this in the past, but the complexity of installation and the API put me off. Someone who already has an understanding of the RPC API might be able to run up a solution quite quickly. The addon code for each type of torrent server is mostly localised to one file like this (and an entry in the list in server.jsm):
Code: Select all
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

var EXPORTED_SYMBOLS = ["paths", "auth", "failed", "parseTorrents", "posts", "stream"];

function postJSON(method, args) JSON.stringify({method: method, arguments: args ? args : {}});

var paths = {connect: "/transmission/rpc"},
    auth = {realm: "Transmission"},
    posts = {fetch: postJSON("torrent-get",
                             {fields: ["name", "status", "errorString", "isFinished", "isStalled", "recheckProgress",
                                       "eta", "uploadRatio", "rateDownload", "rateUpload",
                                       "sizeWhenDone", "leftUntilDone", "percentDone",
                                       "leechers", "seeders", "peersGettingFromUs", "peersSendingToUs"]}),
             pause: postJSON("torrent-stop"),
             unpause: postJSON("torrent-start"),
             addUrl: function(url) postJSON("torrent-add", {paused: false, filename: url})},
    stream = {start: function() '{"method":"torrent-add","arguments":{"metainfo":"',
              data: function(data) btoa(data),
              end: function() '"}}'};

function parseTorrents(json, data)
{
    // Parse the individual torrents
    var state, status, progress, peers, seeds, rateUpload, rateDownload, upRate = 0, downRate = 0;
    var torrent, torrents = json && "arguments" in json && "torrents" in json.arguments ? json.arguments.torrents : [];
    for (var i = 0; i < torrents.length; i++)
    {
        // Map the status codes from the different RPC versions
        torrent = torrents[i];
        data.peers += peers = "leechers" in torrent ? Math.max(0, parseInt(torrent.leechers)) : parseInt(torrent.peersGettingFromUs);
        data.seeds += seeds = "seeders" in torrent ? Math.max(0, parseInt(torrent.seeders)) : parseInt(torrent.peersSendingToUs);
        switch (torrent.errorString ? -1 : torrent.status)
        {
            case 0:
            case 16:
                state = torrent.isFinished ? "stopped" : "paused";
                status = torrent.isFinished ? "Finished" : "Paused";
                break;
            case 1:
            case 2:
                state = "checking";
                status = "Verifying local data " + (torrent.recheckProgress * 100).toFixed(1) + "%";
                break;
            case 3:
                state = "queued";
                status = "Queued for download";
                break;
            case 4:
                status = torrent.isStalled ? "Stalled" : seeds == 0 ? "Idle" : "Downloading";
                state = status == "Downloading" ? "started" : "stalled";
                break;
            case 5:
            case 9:
                state = "queued";
                status = "Queued for seeding";
                break;
            case 6:
            case 8:
                status = torrent.isStalled ? "Stalled" : peers == 0 ? "Idle" : "Seeding";
                state = status == "Seeding" ? "started" : "stalled";
                break;
            default:
                state = "error";
                status = torrent.errorString ? torrent.errorString : "Error";
                break;
        }

        // Add to one of the three torrent categories
        if (state == "error" || state == "checking")
        {
            data.XX.push({state: state, title: torrent.name, status: status});
        }
        else
        {
            upRate += rateUpload = torrent.rateUpload;
            downRate += rateDownload = torrent.rateDownload;
            progress = 100 * ("percentDone" in torrent ? torrent.percentDone : (torrent.sizeWhenDone - torrent.leftUntilDone) / torrent.sizeWhenDone);
            if (progress == 100)
            {
                data.UL.push({state: state, title: torrent.name, rate: this.roundKBS(rateUpload), ratio: torrent.uploadRatio, status: status});
                if (state == "started") data.up++;
            }
            else
            {
                data.DL.push({state: state, title: torrent.name, progress: progress, rate: this.roundKBS(rateDownload), eta: this.eta(torrent.eta), status: status});
                if (state == "started") data.down++;
            }
        }
    }
    data.dlRate = this.roundStyle(downRate);
    data.ulRate = this.roundStyle(upRate);
}

function failed(json) json && json.result && json.result != "success" && json.result;

lithopsian
 
Posts: 3663
Joined: September 15th, 2010, 9:03 am

Post Posted August 22nd, 2015, 12:36 pm

Mozilla has just announced the end of addons as we know it:
https://blog.mozilla.org/addons/2015/08 ... x-add-ons/

I can't imagine doing any major new development work on any of my addons until the fallout from this settles and I can see if there is any future in it. I'll try to keep them at least working well until it becomes obvious that they are dead.

GDixon61
 
Posts: 1
Joined: December 18th, 2015, 12:46 am

Post Posted December 18th, 2015, 12:50 am

Hi,

I just found your add-on and like it.
Only one problem, I use suse tumbleweed with firefox42 and transmission.
When I click a magnet link the link works the download or torrent starts but it opens a empty tab for every magnet link or torrent I click.
Any ideas or a solution?

Greg

lithopsian
 
Posts: 3663
Joined: September 15th, 2010, 9:03 am

Post Posted December 23rd, 2015, 9:11 am

Do you have any tab addons installed? Things that automatically open links in a new tab? It is so common that people often don't realise it isn't a default setting. This might be kicking in on the magnet click even though nothing is going to be opened. If you can find a particular addon or setting that does it, I might be able to find a way to block it.

lithopsian
 
Posts: 3663
Joined: September 15th, 2010, 9:03 am

Post Posted July 4th, 2017, 12:53 pm

Not sure how much use this will be, but I've added support for the new API in qBittorrent v3.2. It should also work with the latest v3.3, maybe someone can confirm?

Draky95
 
Posts: 5
Joined: May 22nd, 2015, 11:42 am

Post Posted July 4th, 2017, 10:57 pm

OMG I still have notification for this :)
Will re-test the addon :)

wazer
 
Posts: 1
Joined: September 16th, 2017, 12:07 am

Post Posted September 16th, 2017, 12:10 am

lithopsian wrote:Not sure how much use this will be, but I've added support for the new API in qBittorrent v3.2. It should also work with the latest v3.3, maybe someone can confirm?

I just created an account to say THANKS a bunch for this lovely addon.

I really hope you transmit this addon over to the new platform or whatever Mozilla got going on now, it says LEGACY under addons section. Please dont leave it to die, really the best addon ever on Firefox.

graycatgrayhat
 
Posts: 1
Joined: September 30th, 2017, 8:42 pm

Post Posted September 30th, 2017, 8:54 pm

I would love to see this addon, in some form be migrated to WebEX. I support several content creators on patreon, and would love to support the development of this and other projects.

Return to Extension/Theme Releases


Who is online

Users browsing this forum: No registered users and 2 guests