def METHOD_NAME(category, discid, xcode='utf8:utf8'):
    # from quodlibet's cddb plugin by Michael Urman
    discinfo = {}
    tracktitles = {}
    read, info = CDDB.read(category, discid, **CLIENTINFO)
    if read != 210: return None
    xf, xt = xcode.split(':')
    for key, value in info.items():
        try:
            value = value.decode('utf-8', 'replace').strip().encode(
                xf, 'replace').decode(xt, 'replace')
        except AttributeError:
            pass
        if key.startswith('TTITLE'):
            try:
                tracktitles[int(key[6:])] = value
            except ValueError:
                pass
        elif key == 'DGENRE':
            discinfo['genre'] = value
        elif key == 'DTITLE':
            dtitle = value.strip().split(' / ', 1)
            if len(dtitle) == 2:
                discinfo['artist'], discinfo['title'] = dtitle
            else:
                discinfo['title'] = dtitle[0].strip()
        elif key == 'DYEAR':
            discinfo['year'] = value
    return discinfo, tracktitles