From 6f026e0c1d0ec6e68538f21c44c5d41583f48020 Mon Sep 17 00:00:00 2001 From: marco Date: Mon, 20 Apr 2020 23:25:34 +0200 Subject: [PATCH] modifiche viste --- platformcode/platformtools.py | 15 +++++++-------- specials/search.py | 3 ++- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/platformcode/platformtools.py b/platformcode/platformtools.py index 7c5953a4..c6056bae 100644 --- a/platformcode/platformtools.py +++ b/platformcode/platformtools.py @@ -250,18 +250,23 @@ def set_view_mode(item, parent_item): config.set_setting('skin_name', xbmc.getSkinDir()) config.set_setting('view_mode_%s' % mode, config.get_localized_string(70003) + ' , 0') - parent_actions = ['peliculas', 'novedades', 'search', 'get_from_temp', 'channel_search', 'newest'] + parent_actions = ['peliculas', 'novedades', 'search', 'get_from_temp', 'channel_search', 'newest', 'discover_list', 'new_search'] if xbmc.getSkinDir() != config.get_setting('skin_name') or not config.get_setting('skin_name'): reset_view_mode() xbmcplugin.setContent(handle=int(sys.argv[1]), content='') xbmc.executebuiltin('Container.SetViewMode(%s)' % 55) + elif parent_item.action == 'findvideos': + mode('server', '') + + elif parent_item.action == 'mainlist': + mode('channel', '') elif (item.contentType in ['movie'] and parent_item.action in parent_actions ) \ or (item.channel in ['videolibrary'] and parent_item.action in ['list_movies']) \ or (parent_item.channel in ['favorites'] and parent_item.action in ['mainlist']) \ - or parent_item.action in ['now_on_tv', 'now_on_misc', 'now_on_misc_film', 'new_search', 'mostrar_perfil']: + or parent_item.action in ['now_on_tv', 'now_on_misc', 'now_on_misc_film', 'mostrar_perfil']: mode('movie', 'movies') elif (item.contentType in ['tvshow'] and parent_item.action in parent_actions ) \ @@ -274,12 +279,6 @@ def set_view_mode(item, parent_item): elif parent_item.action in ['episodios', 'get_episodes'] or item.contentType == 'episode': mode('episode', 'tvshows') - elif parent_item.action == 'findvideos': - mode('server', '') - - elif parent_item.action == 'mainlist': - mode('channel', '') - else: mode('addon', '') diff --git a/specials/search.py b/specials/search.py index 0f9a761f..e38b4629 100644 --- a/specials/search.py +++ b/specials/search.py @@ -156,6 +156,7 @@ def new_search(item): thumbnail=thumbnail, fanart=fanart, mode=item.mode, + contentType=item.mode, infoLabels=result) if item.mode == 'movie': @@ -629,7 +630,7 @@ def discover_list(item): new_item = Item(channel='search', title=typo(title, 'bold'), infoLabels=elem, action='channel_search', text=title, thumbnail=thumbnail, fanart=fanart, - context='', mode=mode, + context='', mode=mode, contentType=mode, release_date=year) if tvshow: