'Sends a NMJ update command to the specified machine
host: The hostname/IP to send the request to (no port)
database: The database to send the requst to
mount: The mount URL to use (optional)
Returns: True if the request succeeded, False otherwise'

def _sendNMJ(self, host):

    try:
        url_scandir = ((((u'http://' + host) + u':8008/metadata_database?arg0=update_scandir&arg1=') + sickrage.srCore.srConfig.NMJv2_DATABASE) + u'&arg2=&arg3=update_all')
        sickrage.srCore.srLogger.debug((u'NMJ    scan    update    command    sent    to    host:    %s' % host))
        url_updatedb = ((((u'http://' + host) + u':8008/metadata_database?arg0=scanner_start&arg1=') + sickrage.srCore.srConfig.NMJv2_DATABASE) + u'&arg2=background&arg3=')
        sickrage.srCore.srLogger.debug((u'Try    to    mount    network    drive    via    url:    %s' % host))
        prereq = urllib2.Request(url_scandir)
        req = urllib2.Request(url_updatedb)
        handle1 = urllib2.urlopen(prereq)
        response1 = handle1.read()
        time.sleep((300.0 / 1000.0))
        handle2 = urllib2.urlopen(req)
        response2 = handle2.read()
    except IOError as e:
        sickrage.srCore.srLogger.warning((u"Warning:    Couldn't    contact    popcorn    hour    on    host    %s:    %s" % (host, e)))
        return False
    try:
        et = ElementTree.fromstring(response1)
        result1 = et.findtext(u'returnValue')
    except SyntaxError as e:
        sickrage.srCore.srLogger.error(u'Unable    to    parse    XML    returned    from    the    Popcorn    Hour:    update_scandir,    {}'.format(e.message))
        return False
    try:
        et = ElementTree.fromstring(response2)
        result2 = et.findtext(u'returnValue')
    except SyntaxError as e:
        sickrage.srCore.srLogger.error(u'Unable    to    parse    XML    returned    from    the    Popcorn    Hour:    scanner_start,    {}'.format(e.message))
        return False
    error_codes = [u'8', u'11', u'22', u'49', u'50', u'51', u'60']
    error_messages = [u'Invalid    parameter(s)/argument(s)', u'Invalid    database    path', u'Insufficient    size', u'Database    write    error', u'Database    read    error', u'Open    fifo    pipe    failed', u'Read    only    file    system']
    if (int(result1) > 0):
        index = error_codes.index(result1)
        sickrage.srCore.srLogger.error((u'Popcorn    Hour    returned    an    error:    %s' % error_messages[index]))
        return False
    elif (int(result2) > 0):
        index = error_codes.index(result2)
        sickrage.srCore.srLogger.error((u'Popcorn    Hour    returned    an    error:    %s' % error_messages[index]))
        return False
    else:
        sickrage.srCore.srLogger.info(u'NMJv2    started    background    scan')
        return True
