<commit_before>import re
import xbmc
import xbmcgui

from lib.libs import mediatypes, pykodi
from lib.libs.pykodi import localize as L

SEASON_NUMBER = 20358
SPECIALS = 20381
UNKNOWN_SOURCE = 32000
CHOOSE_TYPE_HEADER = 32050
CHOOSE_ART_HEADER = 32051
REFRESH_ITEM = 32409

def prompt_for_artwork(mediatype, medialabel, availableart, monitor):
    if not availableart:
        return None, None

    addon = pykodi.get_main_addon()
    arttypes = []
    for arttype, artlist in availableart.iteritems():
        if arttype.startswith('season.-1.'):
            # Ignore 'all' seasons artwork, as I can't set artwork for it with JSON
            continue
        label = arttype if not arttype.startswith('season.') else get_seasonlabel(arttype)
        for image in artlist:
            if image.get('existing'):
                arttypes.append({'arttype': arttype, 'label': label, 'count': len(artlist), 'url': image['url']})
                break
        if arttype not in (at['arttype'] for at in arttypes):
            arttypes.append({'arttype': arttype, 'label': label, 'count': len(artlist)})
    arttypes.sort(key=lambda art: sort_arttype(art['arttype']))
    typeselectwindow = ArtworkTypeSelector('DialogSelect.xml', addon.path, arttypes=arttypes,
        medialabel=medialabel, show_refresh=mediatype == mediatypes.MOVIESET)
    hqpreview = addon.get_setting('highquality_preview')
    singletype = arttypes[0]['arttype'] if len(arttypes) == 1 else None
    selectedarttype = None<commit_msg>fix: movie sets can always be refreshed<commit_after>import re
import xbmc
import xbmcgui

from lib.libs import mediatypes, pykodi
from lib.libs.pykodi import localize as L

SEASON_NUMBER = 20358
SPECIALS = 20381
UNKNOWN_SOURCE = 32000
CHOOSE_TYPE_HEADER = 32050
CHOOSE_ART_HEADER = 32051
REFRESH_ITEM = 32409

def prompt_for_artwork(mediatype, medialabel, availableart, monitor):
    if not availableart:
        return None, None

    addon = pykodi.get_main_addon()
    arttypes = []
    for arttype, artlist in availableart.iteritems():
        if arttype.startswith('season.-1.'):
            # Ignore 'all' seasons artwork, as I can't set artwork for it with JSON
            continue
        label = arttype if not arttype.startswith('season.') else get_seasonlabel(arttype)
        for image in artlist:
            if image.get('existing'):
                arttypes.append({'arttype': arttype, 'label': label, 'count': len(artlist), 'url': image['url']})
                break
        if arttype not in (at['arttype'] for at in arttypes):
            arttypes.append({'arttype': arttype, 'label': label, 'count': len(artlist)})
    arttypes.sort(key=lambda art: sort_arttype(art['arttype']))
    typeselectwindow = ArtworkTypeSelector('DialogSelect.xml', addon.path, arttypes=arttypes,
        medialabel=medialabel, show_refresh=mediatype == mediatypes.MOVIESET)
    hqpreview = addon.get_setting('highquality_preview')
    singletype = arttypes[0]['arttype'] if mediatype == 'episode' and len(arttypes) == 1 else None
    selectedarttype = None
{'fraction_non_alphanumeric': 0.10631337912986588, 'fraction_numerical': 0.021589793915603533, 'mean_word_length': 3.626323751891074, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4002610', 'n_tokens_mistral': 1047, 'n_tokens_neox': 953, 'n_words': 252}