mirror of https://github.com/Kylart/KawAnime.git
Removed now useless files from bindings
This commit is contained in:
parent
3cb652f16e
commit
86c7f0180a
|
@ -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)
|
|
@ -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"
|
||||
}
|
Loading…
Reference in New Issue