From 86c7f0180a375613050168feba1b3aa95ae44d22 Mon Sep 17 00:00:00 2001 From: Kylart Date: Wed, 15 Apr 2020 18:34:43 +0200 Subject: [PATCH] Removed now useless files from bindings --- bindings/example.js | 41 ----------------------------------------- bindings/index.js | 0 bindings/package.json | 17 ----------------- 3 files changed, 58 deletions(-) delete mode 100644 bindings/example.js delete mode 100644 bindings/index.js delete mode 100644 bindings/package.json diff --git a/bindings/example.js b/bindings/example.js deleted file mode 100644 index 12fd18f..0000000 --- a/bindings/example.js +++ /dev/null @@ -1,41 +0,0 @@ -const { torrent } = require('./build/Release/kawatorrent.node') - -const client = new torrent.Client() - -const TORRENTS = [ - 'magnet:?xt=urn:btih:50af27af300b44aec651add3eeb7135fd0c15bfa&dn=%5BHorribleSubs%5D%20Hoshiai%20no%20Sora%20-%2005%20%5B720p%5D.mkv&tr=http%3A%2F%2Fnyaa.tracker.wf%3A7777%2Fannounce&tr=udp%3A%2F%2Fopen.stealth.si%3A80%2Fannounce&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337%2Fannounce&tr=udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969%2Fannounce&tr=udp%3A%2F%2Fexodus.desync.com%3A6969%2Fannounce', - 'magnet:?xt=urn:btih:cac2f5ab4f78a4605c77075dd51720a079c07616&dn=%5BHorribleSubs%5D%20Babylon%20-%2006%20%5B720p%5D.mkv&tr=http%3A%2F%2Fnyaa.tracker.wf%3A7777%2Fannounce&tr=udp%3A%2F%2Fopen.stealth.si%3A80%2Fannounce&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337%2Fannounce&tr=udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969%2Fannounce&tr=udp%3A%2F%2Fexodus.desync.com%3A6969%2Fannounce' -] - -const DIR = './blabla' - -function logNames () { - const torrents = client.getTorrents() - - torrents.forEach((torrent) => { - const { id, name, isPaused, files, downloadLimit, downloadRate } = torrent.info() - console.log(`${id} --> ${name} (${isPaused ? 'PAUSED' : 'RUNNING'}): ${downloadRate} / ${downloadLimit}`, files) - }) -} - -client.addTorrent(DIR, TORRENTS[0]) - -setInterval(logNames, 1000) - -setTimeout(() => { - console.log('adding one') - client.addTorrent(DIR, TORRENTS[1]) -}, 2000) - -setTimeout(() => { - console.log('Pausing first') - client.getTorrents()[0].pause() -}, 4000) - -setTimeout(() => { - console.log('Resuming first') - client.getTorrents()[0].resume() - - console.log('setting limit') - client.getTorrents()[0].setLimit(1000, 'download') -}, 6000) diff --git a/bindings/index.js b/bindings/index.js deleted file mode 100644 index e69de29..0000000 diff --git a/bindings/package.json b/bindings/package.json deleted file mode 100644 index fcf7985..0000000 --- a/bindings/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "kawabinds", - "version": "0.1.0", - "description": "KawAnime's native bindings", - "main": "index.js", - "directories": { - "lib": "lib" - }, - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "author": { - "name": "Kylart", - "email": "Kylart.dev@gmail.com" - }, - "license": "MIT" -}