Page 1 of 1

Help with axel

Posted: Mon Oct 26, 2015 3:04 pm
by batman
Hi there, I'm linux user and so far I'm fan of using Axel as my downloader on firefox.
Axel can give you the option of putting all the threads you want (You can put even a 1000, even if the server only support 8) Problem is that when I use Flashgot's own option for Axel it always uses 4. I try my own option but it's not as good as the original. So could you please give the script you use for Flashgot's inbuilt option please?

Re: Help with axel

Posted: Thu Oct 19, 2017 8:59 am
by eexpss
Same here, only 4 threads. Flashgot has no inputbox to add parameter for axel now. and axel ignore ~/.axelrc and /etc/axelrc. So strange.

Re: Help with axel

Posted: Fri Oct 20, 2017 6:21 pm
by userr
From DMS.js:

Code: Select all

  dm = new FlashGotDMX("Axel", "axel", '-n 4 [-o FNAME] [URL]');
  dm.terminal = true;
  dm.createJob = function(links, opType) {
    this.argsTemplate = this.argsTemplate.replace(/\b-n \d+/, "-n " + this.getPref("connections", 4));
    this._checkAxelFeatures();
    return this.__proto__.createJob.call(this, links , opType);
  };
  dm._checkAxelFeatures = function() {
    const outFile = fg.tmpDir.clone();
    outFile.append("axelHelp.txt");
    this.performJob(this.unixCmd + " -h >'" + outFile.path + "' 2>&1", true);
    if(IO.readFile(outFile).indexOf("--header") < 0) {
      this.cookieSupport = false;
    } else {
      this.cookieSupport = true;
      this.argsTemplate = '[-H Cookie:COOKIE] [-H Referer:REFERER] ' + this.argsTemplate;
    }
    this.checkCookieSupport();
    this._checkAxelFeatures = function() {};
  }
Which means:
1) You can override the number of connections with flashgot.dmsopts.Axel.connections pref (use about:config to change/create it).
2) The command line template FlashGot uses is one of these two, depending on whether your version supports the "--header" switch. The "4" in the commad line gets replaced with your pref if it exists.
Supports:

Code: Select all

[-H Cookie:COOKIE] [-H Referer:REFERER] -n 4 [-o FNAME] [URL]
Doesn't:

Code: Select all

-n 4 [-o FNAME] [URL]