Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added pause/resume, refactored code, improved command line interface, etc #514

Closed
wants to merge 21 commits into from
Closed
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

updated minified build

  • Loading branch information
whitef0x0 committed Dec 2, 2015
commit 488bcc936e9c19cb4af776a45711c894e2033ff6
@@ -459,8 +459,9 @@ function runDownload (torrentId) {
device.play(href, function () {})
})
}

process.stdin.setRawMode(true)
if (process.stdin.isTTY) {
process.stdin.setRawMode(true)
}
process.stdin.resume()
drawTorrent(torrent)
}
@@ -527,7 +528,9 @@ function runSeed (input) {

client.on('torrent', function (torrent) {
if (argv.quiet) console.log(torrent.magnetURI)
process.stdin.setRawMode(true)
if (process.stdin.isTTY) {
process.stdin.setRawMode(true)
}
process.stdin.resume()
drawTorrent(torrent)
})
@@ -568,7 +571,9 @@ function drawTorrent (torrent) {
torrent.resume()
gracefulExit()
} else {
process.stdin.setRawMode(true)
if (process.stdin.isTTY) {
process.stdin.setRawMode(true)
}
process.stdin.resume()
torrent.resume()
blockDraw = false
@@ -581,7 +586,9 @@ function drawTorrent (torrent) {
})
} else if (!cliInput && (chunk === 'p')) {
cliInput = true
process.stdin.setRawMode(false)
if (process.stdin.isTTY) {
process.stdin.setRawMode(false)
}
process.stdin.pause()
torrent.pause()
clivas.line('{green: torrent paused}')
@@ -607,7 +614,9 @@ function drawTorrent (torrent) {
torrent.resume()
gracefulExit()
} else {
process.stdin.setRawMode(true)
if (process.stdin.isTTY) {
process.stdin.setRawMode(true)
}
process.stdin.resume()
torrent.resume()
blockDraw = false
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.