1
0
Fork 0
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:
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: {