'Creates an elementTree XML structure for an KODI-style tvshow.nfo and
returns the resulting data object.
show_obj: a TVShow instance to create the NFO for'

def _show_data(self, show_obj):

    show_ID = show_obj.indexerid
    indexer_lang = (show_obj.lang or sickrage.srCore.srConfig.INDEXER_DEFAULT_LANGUAGE)
    lINDEXER_API_PARMS = srIndexerApi(show_obj.indexer).api_params.copy()
    lINDEXER_API_PARMS[u'language'] = indexer_lang
    if (show_obj.dvdorder != 0):
        lINDEXER_API_PARMS[u'dvdorder'] = True
    t = srIndexerApi(show_obj.indexer).indexer(**lINDEXER_API_PARMS)
    tv_node = Element(u'tvshow')
    try:
        myShow = t[int(show_ID)]
    except indexer_shownotfound:
        sickrage.srCore.srLogger.error(((((u'Unable    to    find    show    with    id    ' + str(show_ID)) + u'    on    ') + srIndexerApi(show_obj.indexer).name) + u',    skipping    it'))
        raise
    except indexer_error:
        sickrage.srCore.srLogger.error(((u'' + srIndexerApi(show_obj.indexer).name) + u"    is    down,    can't    use    its    data    to    add    this    show"))
        raise
    if (not (getattr(myShow, u'seriesname', None) and getattr(myShow, u'id', None))):
        sickrage.srCore.srLogger.info(((((u'Incomplete    info    for    show    with    id    ' + str(show_ID)) + u'    on    ') + srIndexerApi(show_obj.indexer).name) + u',    skipping    it'))
        return False
    title = SubElement(tv_node, u'title')
    title.text = myShow[u'seriesname']
    if getattr(myShow, u'rating', None):
        rating = SubElement(tv_node, u'rating')
        rating.text = myShow[u'rating']
    if getattr(myShow, u'firstaired', None):
        try:
            year_text = str(datetime.datetime.strptime(myShow[u'firstaired'], dateFormat).year)
            if year_text:
                year = SubElement(tv_node, u'year')
                year.text = year_text
        except:
            pass
    if getattr(myShow, u'overview', None):
        plot = SubElement(tv_node, u'plot')
        plot.text = myShow[u'overview']
    if getattr(myShow, u'contentrating', None):
        mpaa = SubElement(tv_node, u'mpaa')
        mpaa.text = myShow[u'contentrating']
    if getattr(myShow, u'id', None):
        indexerid = SubElement(tv_node, u'id')
        indexerid.text = str(myShow[u'id'])
    if (getattr(myShow, u'genre', None) and isinstance(myShow[u'genre'], basestring)):
        genre = SubElement(tv_node, u'genre')
        genre.text = u'    /    '.join((x.strip() for x in myShow[u'genre'].split(u'|') if x.strip()))
    if getattr(myShow, u'firstaired', None):
        premiered = SubElement(tv_node, u'premiered')
        premiered.text = myShow[u'firstaired']
    if getattr(myShow, u'network', None):
        studio = SubElement(tv_node, u'studio')
        studio.text = myShow[u'network'].strip()
    if getattr(myShow, u'_actors', None):
        for actor in myShow[u'_actors']:
            cur_actor = SubElement(tv_node, u'actor')
            if ((u'name' in actor) and actor[u'name'].strip()):
                cur_actor_name = SubElement(cur_actor, u'name')
                cur_actor_name.text = actor[u'name'].strip()
            else:
                continue
            if ((u'role' in actor) and actor[u'role'].strip()):
                cur_actor_role = SubElement(cur_actor, u'role')
                cur_actor_role.text = actor[u'role'].strip()
            if ((u'image' in actor) and actor[u'image'].strip()):
                cur_actor_thumb = SubElement(cur_actor, u'thumb')
                cur_actor_thumb.text = actor[u'image'].strip()
    indentXML(tv_node)
    data = ElementTree(tv_node)
    return data
