def addTorrentByMagnetURI(magnet)
      raise "addTorrentByMagnetURI should be called with a MagnetURI object, not a #{magnet.class}" if ! magnet.is_a?(MagnetURI)

      trackerUrl = magnet.trackers
      raise "addTorrentByMagnetURI can't handle magnet links that don't have a tracker URL." if !trackerUrl

      addTorrentWithoutMetainfo(trackerUrl, magnet.btInfoHash, magnet)
    end
def addTorrentByMagnetURI(magnet)
      raise "addTorrentByMagnetURI should be called with a MagnetURI object, not a #{magnet.class}" if ! magnet.is_a?(MagnetURI)

      trackerUrl = magnet.trackers
      raise "addTorrentByMagnetURI can't handle magnet links that don't have a tracker URL." if !trackerUrl

      addTorrentWithoutMetainfo(trackerUrl, magnet.btInfoHash, magnet)
    end
Add a new torrent to manage given a MagnetURI object. This is generally the
 method to call if you have a magnet link.
 Returns the infoHash of the newly added torrent.