'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 fail checking before using the downloader, so the downloader
doesn\'t need to worry about that
:return: boolean
One fail returns false, but the downloader should log his own errors'

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

    if (not media):
        media = {}
    if (not data):
        data = {}
    response = False
    log.info('Sending    "%s"    (%s)    to    Synology.', (data['name'], data['protocol']))
    host = cleanHost(self.conf('host'), protocol=False).split(':')
    if (not isInt(host[1])):
        log.error('Config    properties    are    not    filled    in    correctly,    port    is    missing.')
        return False
    try:
        srpc = SynologyRPC(host[0], host[1], self.conf('username'), self.conf('password'), self.conf('destination'))
        if (data['protocol'] == 'torrent_magnet'):
            log.info('Adding    torrent    URL    %s', data['url'])
            response = srpc.create_task(url=data['url'])
        elif (data['protocol'] in ['nzb', 'torrent']):
            log.info(('Adding    %s' % data['protocol']))
            if (not filedata):
                log.error('No    %s    data    found', data['protocol'])
            else:
                filename = ((data['name'] + '.') + data['protocol'])
                response = srpc.create_task(filename=filename, filedata=filedata)
    except:
        log.error('Exception    while    adding    torrent:    %s', traceback.format_exc())
    finally:
        return (self.downloadReturnId('') if response else False)
