'Send a torrent/nzb file to the downloader
:param data: dict returned from provider
Contains the release information
:param media: media dict with information
Used for creating the filename when possible
:param filedata: downloaded torrent/nzb filedata
The file gets downloaded in the searcher and send to this function
This is done to have failed checking before using the downloader, so the downloader
doesn\'t need to worry about that
:return: boolean
One faile returns false, but the downloaded should log his own errors'

def download(self, data=None, media=None, filedata=None):

    if (not media):
        media = {}
    if (not data):
        data = {}
    log.debug("Sending    '%s'    (%s)    to    uTorrent.", (data.get('name'), data.get('protocol')))
    if (not self.connect()):
        return False
    torrent_params = {}
    if self.conf('label'):
        torrent_params['label'] = self.conf('label')
    if ((not filedata) and (data.get('protocol') == 'torrent')):
        log.error('Failed    sending    torrent,    no    data')
        return False
    if (data.get('protocol') == 'torrent_magnet'):
        torrent_hash = re.findall('urn:btih:([\\w]{32,40})', data.get('url'))[0].upper()
        torrent_params['trackers'] = '%0D%0A%0D%0A'.join(self.torrent_trackers)
    else:
        info = bdecode(filedata)['info']
        torrent_hash = sha1(benc(info)).hexdigest().upper()
    torrent_filename = self.createFileName(data, filedata, media)
    if data.get('seed_ratio'):
        torrent_params['seed_override'] = 1
        torrent_params['seed_ratio'] = tryInt((tryFloat(data['seed_ratio']) * 1000))
    if data.get('seed_time'):
        torrent_params['seed_override'] = 1
        torrent_params['seed_time'] = (tryInt(data['seed_time']) * 3600)
    if (len(torrent_hash) == 32):
        torrent_hash = b16encode(b32decode(torrent_hash))
    if (data.get('protocol') == 'torrent_magnet'):
        self.utorrent_api.add_torrent_uri(torrent_filename, data.get('url'))
    else:
        self.utorrent_api.add_torrent_file(torrent_filename, filedata)
    self.utorrent_api.set_torrent(torrent_hash, torrent_params)
    if self.conf('paused', default=0):
        self.utorrent_api.pause_torrent(torrent_hash)
    return self.downloadReturnId(torrent_hash)
