How to use the aria2.options function in aria2

To help you get started, we’ve selected a few aria2 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github zaidka / cliget / lib / getters.js View on Github external
exports.aria2 = function(request, filename) {
  if (request.method !== "GET" || request.payload)
    return null;

  let cmd = "aria2c";

  for (let i in request.headers) {
    cmd += ' --header ' + escapeShellArg(request.headers[i]);
  }

  if (filename)
    cmd += ' --out ' + escapeShellArg(filename);

  cmd += ' ' + escapeShellArg(request.uri);

  let aria2Options = prefs['aria2.options'];
  if (aria2Options)
    cmd += ' ' + aria2Options;

  return cmd;
};

aria2

Library and for aria2, "The next generation download utility."

ISC
Latest version published 3 years ago

Package Health Score

45 / 100
Full package analysis

Popular aria2 functions