Fix Tmdb, Menu contestuale, Autoplay
This commit is contained in:
+3
-2
@@ -1537,12 +1537,13 @@ class Tmdb(object):
|
|||||||
return ret_dic
|
return ret_dic
|
||||||
|
|
||||||
def get_list_episodes(self):
|
def get_list_episodes(self):
|
||||||
url = '{}/tv/{}?api_key={}&language={}'.format(host=host, id=self.search_id, api=api, lang=self.search_language)
|
# from core.support import dbg;dbg()
|
||||||
|
url = '{}/tv/{}?api_key={}&language={}'.format(host, self.search_id, api, self.search_language)
|
||||||
results = requests.get(url).json().get('seasons', [])
|
results = requests.get(url).json().get('seasons', [])
|
||||||
seasons = []
|
seasons = []
|
||||||
if results and 'Error' not in results:
|
if results and 'Error' not in results:
|
||||||
for season in results:
|
for season in results:
|
||||||
url = '{host}/tv/{id}/season/{season}?api_key={api}&language={lang}'.format(host=host, id=self.search_id, season=season['season_number'], api=api, lang=self.search_language)
|
url = '{}/tv/{}/season/{}?api_key={}&language={}'.format(host, self.search_id, season['season_number'], api, self.search_language)
|
||||||
try: start_from = requests.get(url).json()['episodes'][0]['episode_number']
|
try: start_from = requests.get(url).json()['episodes'][0]['episode_number']
|
||||||
except: start_from = 1
|
except: start_from = 1
|
||||||
seasons.append({'season_number':season['season_number'], 'episode_count':season['episode_count'], 'start_from':start_from})
|
seasons.append({'season_number':season['season_number'], 'episode_count':season['episode_count'], 'start_from':start_from})
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
@@ -336,11 +336,8 @@ def render_items(itemlist, parent_item):
|
|||||||
if not item.title:
|
if not item.title:
|
||||||
item.title = ''
|
item.title = ''
|
||||||
# If there is no action or it is findvideos / play, folder = False because no listing will be returned
|
# If there is no action or it is findvideos / play, folder = False because no listing will be returned
|
||||||
if item.folder == "": # not set
|
if item.action in ['play', '']:
|
||||||
if item.action in ['play', '']:
|
item.folder = False
|
||||||
item.folder = False
|
|
||||||
else:
|
|
||||||
item.folder = True
|
|
||||||
if item.fanart == "":
|
if item.fanart == "":
|
||||||
item.fanart = parent_item.fanart
|
item.fanart = parent_item.fanart
|
||||||
if item.action == 'play' and thumb_type == 1 and not item.forcethumb:
|
if item.action == 'play' and thumb_type == 1 and not item.forcethumb:
|
||||||
@@ -361,7 +358,8 @@ def render_items(itemlist, parent_item):
|
|||||||
listitem.setArt({'icon': icon_image, 'thumb': item.thumbnail, 'poster': item.thumbnail,
|
listitem.setArt({'icon': icon_image, 'thumb': item.thumbnail, 'poster': item.thumbnail,
|
||||||
'fanart': item.fanart if item.fanart else default_fanart})
|
'fanart': item.fanart if item.fanart else default_fanart})
|
||||||
|
|
||||||
listitem.setProperty('IsPlayable', str(config.get_setting("player_mode") == 1 and item.action == "play" and not item.nfo).lower())
|
if config.get_setting("player_mode") == 1 and item.action == "play" and not item.nfo:
|
||||||
|
listitem.setProperty('IsPlayable', 'true')
|
||||||
|
|
||||||
set_infolabels(listitem, item)
|
set_infolabels(listitem, item)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user