Example #1
0
def dialogo_busquedas_por_fallo_web(item):
    item_search = None

    if item.contentType == 'movie' and item.contentExtra == 'documentary':
        busqueda = 'el documental [COLOR gold]%s[/COLOR]' % item.contentTitle
    if item.contentType == 'movie':
        busqueda = 'la película [COLOR gold]%s[/COLOR]' % item.contentTitle
    else:
        busqueda = 'la serie [COLOR gold]%s[/COLOR]' % item.contentSerieName

    if dialog_yesno('Error en el canal ' + item.channel, 
                    'El enlace o la web de la que depende parece no estar disponible.',
                    '¿ Buscar %s en otros canales ?' % busqueda):

        infolabels = {'tmdb_id': item.infoLabels['tmdb_id']} if item.infoLabels['tmdb_id'] else {}
        item_search = Item(channel='search', action='search', from_channel=item.channel, infoLabels=infolabels)

    else:
        if dialog_yesno('Error en el canal ' + item.channel, 
                        'Si crees que la web funciona, quizás ha cambiado el enlace.',
                        '¿ Volver a buscar %s en el mismo canal ?' % busqueda):

            item_search = Item(channel=item.channel, action='search')

    if item_search is not None:
        if item.contentSerieName != '':
            item_search.search_type = 'tvshow'
            item_search.buscando = item.contentSerieName
        else:
            item_search.search_type = 'movie' if item.contentExtra != 'documentary' else 'documentary'
            item_search.buscando = item.contentTitle

    return item_search