def _release_key(release):
    """Create a comparison key from a release."""
    key = []
    key.append(release['artist'].casefold())
    key.append(release['title'].casefold())
    status = release.get('status', 'Unknown')
    if status == 'Official':
        key.append(0)
    elif status == 'Bootleg':
        key.append(2)
    else:
        key.append(1)
    key.append(release['medium-count'])
    key.append(release.get('barcode', '9999999999999').lstrip('0'))
    key.append(release.get('date', '9999'))
    return tuple(key)
