npm install mega-torrent
var Mega_Torrent = require('mega-torrent')
Create new torrent downloader.
email - User login email (Require)
password - User password (Require)
Start downloading a torrent.
• magnet uri (string)
• torrent file (buffer)
• info hash (hex string or buffer)
• parsed torrent (from parse-torrent)
• http/https url to a torrent file (string)
• filesystem path to a torrent file (string)
Return the current status of the Mega_Torrent instance.
• 0 - Doing nothing
• 1 - Downloading the Torrent
• 2 - Uploading the Torrent
Return running uploading instances. (aka megas)
Return running downloading instances. (aka clients)
Instance of current uploading file to MEGA.
Return Node stream instance.
Return the current upload percentage. (between 0 and 1)
Return Node fs stats instance.
Instance of downloading torrent client.
Stop and destroy the current downloading torrent.
Return the current download percentage. (between 0 and 1)
Return WebTorrent torrent instance.