#4176 Add torrent by info hash

This commit is contained in:
Mitchell Livingston
2011-06-16 02:19:39 +00:00
parent 967116ff71
commit 878f8c775e

View File

@@ -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: {