code: func (c *Client) TorrentAdd(payload *TorrentAddPayload) (torrent *Torrent, err error) {
  	// Validate
  	if payload == nil {
  		err = errors.New("payload can't be nil")
  		return
  	}
  	if payload.Filename == nil && payload.MetaInfo == nil {
  		err = errors.New("Filename and MetaInfo can't be both nil")
  		return
  	}
  	// Send payload
  	var result torrentAddAnswer
  	if err = c.rpcCall("torrent-add", payload, &result); err != nil {
  		err = fmt.Errorf("'torrent-add' rpc method failed: %v", err)
  		return
  	}
  	// Extract results
  	if result.TorrentAdded != nil {
  		torrent = result.TorrentAdded
  	} else if result.TorrentDuplicate != nil {
  		torrent = result.TorrentDuplicate
  	} else {
  		err = errors.New("RPC call went fine but neither 'torrent-added' nor 'torrent-duplicate' result payload were found")
  	}
  	return
  }
docs: // TorrentAdd allows to send an Add payload. If successful (torrent added or duplicate) torrent
  // return value will only have HashString, ID and Name fields set up.
  // https://github.com/transmission/transmission/blob/2.9x/extras/rpc-spec.txt#L373