Skip to content

seiya-npm/add-trackers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

add-trackers

npm npm downloads

Add trackers to exist torrent file.

Install with npm

npm install bencode
npm install add-trackers

Usage

const { addTrackers } = require('add-trackers');
const fs = require('fs');

Add trackers

let newFile = addTrackers(pathToFile,mainTracker,trackerList,replaceTrackers);
fs.writeFileSync(pathToFile,newFile);
  • pathToFile (string) - path to torrent file
  • mainTracker (string) - update main tracker
  • trackerList (array) - tracker list (if false use default list)
  • replaceTrackers (boolean) - replace trackers from tracker list