mirror of
https://github.com/transmission/transmission
synced 2025-02-12 09:25:03 +00:00
#4176 Add torrent by info hash
This commit is contained in:
parent
967116ff71
commit
878f8c775e
1 changed files with 3 additions and 0 deletions
|
@ -249,6 +249,9 @@ TransmissionRemote.prototype =
|
|||
},
|
||||
addTorrentByUrl: function( url, options ) {
|
||||
var remote = this;
|
||||
if(url.match(/^[0-9a-f]{40}$/i)) {
|
||||
url = 'magnet:?xt=urn:btih:'+url;
|
||||
}
|
||||
var o = {
|
||||
method: 'torrent-add',
|
||||
arguments: {
|
||||
|
|
Loading…
Reference in a new issue