def addTorrentByMetainfo(metainfo)
      raise "addTorrentByMetainfo should be called with a Metainfo object, not #{metainfo.class}" if ! metainfo.is_a?(Metainfo)
      trackerclient = TrackerClient.createFromMetainfo(metainfo, false)
      addTorrent(trackerclient, metainfo.infoHash, metainfo.info)
    end
def addTorrentByMetainfo(metainfo)
      raise "addTorrentByMetainfo should be called with a Metainfo object, not #{metainfo.class}" if ! metainfo.is_a?(Metainfo)
      trackerclient = TrackerClient.createFromMetainfo(metainfo, false)
      addTorrent(trackerclient, metainfo.infoHash, metainfo.info)
    end
Add a new torrent to manage described by a Metainfo object. This is generally the
 method to call if you have a .torrent file.
 Returns the infoHash of the newly added torrent.