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

added documentation for getBySearch

  • Loading branch information
whitef0x0 committed Nov 27, 2015
commit b003801db9d7dfb5c2bcf11473d3e7901e384e61
@@ -108,9 +108,16 @@ Object.defineProperty(WebTorrent.prototype, 'ratio', {
}
})


/**
* Searchs by query and downloads the first torrent that most closely matches with `query`.
*
* @param {string} query
* @return {Torrent|null}
*/
WebTorrent.prototype.getBySearch = function (query) {
var self = this
if(!query) return
if(!query) return null

search(query).then(function(search_results) {
search_results = search_results.slice(0, 9).filter(function(r){ if(r.torrent || r.magnet) return })
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.