Пример #1
0
def _create_dictitem_from_row(row):
    row_id = str(row['ID'])
    search_desc = common.get_local_string(30401) + ': ' + SEARCH_TYPES_DESC.get(row['Type'], 'Unknown')
    return {
        'url': common.build_url(['search', 'search', row_id], mode=G.MODE_DIRECTORY),
        'label': row['Value'],
        'info': {'plot': search_desc},  # The description
        'menu_items': generate_context_menu_searchitem(row_id, row['Type']),
        'is_folder': True
    }
def _create_diritem_from_row(row):
    row_id = str(row['ID'])
    search_desc = common.get_local_string(
        30401) + ': ' + SEARCH_TYPES_DESC.get(row['Type'], 'Unknown')
    list_item = xbmcgui.ListItem(label=row['Value'], offscreen=True)
    list_item.setInfo('video', {'plot': search_desc})
    list_item.addContextMenuItems(
        generate_context_menu_searchitem(row_id, row['Type']))
    return common.build_url(['search', 'search', row_id],
                            mode=G.MODE_DIRECTORY), list_item, True