'Returns True if a release has previously failed.
If provider is given, return True only if the release is found
with that specific provider. Otherwise, return True if the release
is found with any provider.
:param release: Release name to record failure
:param size: Size of release
:param provider: Specific provider to search (defaults to all providers)
:return: True if a release has previously failed.'

@staticmethod
def hasFailed(release, size, provider=u'%'):

    release = FailedHistory.prepareFailedName(release)
    dbData = [x[u'doc'] for x in sickrage.srCore.failedDB.db.get_many(u'failed', release, with_doc=True) if ((x[u'doc'][u'size'] == size) and (x[u'doc'][u'provider'] == provider))]
    return (len(dbData) > 0)
