Fix Community and tmdb
This commit is contained in:
@@ -370,13 +370,13 @@ def set_infoLabels_item(item, seekTmdb=True, idioma_busqueda=def_lang, lock=None
|
||||
if temporada:
|
||||
# Actualizar datos
|
||||
__leer_datos(otmdb_global)
|
||||
item.infoLabels['title'] = temporada['name']
|
||||
if temporada['overview']:
|
||||
item.infoLabels['title'] = temporada['name'] if temporada.has_key('name') else ''
|
||||
if temporada.has_key('overview') and temporada['overview']:
|
||||
item.infoLabels['plot'] = temporada['overview']
|
||||
if temporada['air_date']:
|
||||
if temporada.has_key('air_date') and temporada['air_date']:
|
||||
date = temporada['air_date'].split('-')
|
||||
item.infoLabels['aired'] = date[2] + "/" + date[1] + "/" + date[0]
|
||||
if temporada['poster_path']:
|
||||
if temporada.has_key('poster_path') and temporada['poster_path']:
|
||||
item.infoLabels['poster_path'] = 'http://image.tmdb.org/t/p/original' + temporada['poster_path']
|
||||
item.thumbnail = item.infoLabels['poster_path']
|
||||
|
||||
|
||||
@@ -444,7 +444,7 @@ def get_seasons(item):
|
||||
if inspect.stack()[1][3] in ['add_tvshow', "get_seasons"] or show_seasons == False:
|
||||
it = []
|
||||
for item in itemlist:
|
||||
it += episodios(item)
|
||||
if os.path.isfile(item.url): it += episodios(item)
|
||||
itemlist = it
|
||||
|
||||
if inspect.stack()[1][3] not in ['add_tvshow', 'get_episodes', 'update', 'find_episodes', 'get_newest']:
|
||||
@@ -471,6 +471,7 @@ def get_seasons(item):
|
||||
|
||||
|
||||
def episodios(item):
|
||||
# support.dbg()
|
||||
support.log()
|
||||
itm = item
|
||||
|
||||
@@ -489,8 +490,13 @@ def episodios(item):
|
||||
if pagination and (pag - 1) * pagination > i: continue # pagination
|
||||
if pagination and i >= pag * pagination: break # pagination
|
||||
match = []
|
||||
if episode.has_key('number'): match = support.match(episode['number'], r'(?P<season>\d+)x(?P<episode>\d+)')[0][0]
|
||||
if not match and episode.has_key('title'): match = support.match(episode['title'], r'(?P<season>\d+)x(?P<episode>\d+)')[0][0]
|
||||
if episode.has_key('number'):
|
||||
match = support.match(episode['number'], r'(?P<season>\d+)x(?P<episode>\d+)')[0]
|
||||
if match:
|
||||
match = match[0]
|
||||
if not match and episode.has_key('title'):
|
||||
match = support.match(episode['title'], r'(?P<season>\d+)x(?P<episode>\d+)')[0]
|
||||
if match: match = match[0]
|
||||
if match:
|
||||
episode_number = match[1]
|
||||
ep = int(match[1]) + 1
|
||||
@@ -505,27 +511,27 @@ def episodios(item):
|
||||
episode_number = str(ep).zfill(2)
|
||||
ep += 1
|
||||
|
||||
infoLabels['season'] = season_number
|
||||
infoLabels['episode'] = episode_number
|
||||
infoLabels['season'] = season_number
|
||||
infoLabels['episode'] = episode_number
|
||||
|
||||
plot = episode['plot'] if episode.has_key('plot') else item.plot
|
||||
thumbnail = episode['poster'] if episode.has_key('poster') else episode['thumbnail'] if episode.has_key('thumbnail') else item.thumbnail
|
||||
plot = episode['plot'] if episode.has_key('plot') else item.plot
|
||||
thumbnail = episode['poster'] if episode.has_key('poster') else episode['thumbnail'] if episode.has_key('thumbnail') else item.thumbnail
|
||||
|
||||
title = ' - ' + episode['title'] if episode.has_key('title') else ''
|
||||
title = '%sx%s%s' % (season_number, episode_number, title)
|
||||
if season_number == item.filter or not item.filterseason:
|
||||
itemlist.append(Item(channel= item.channel,
|
||||
title= format_title(title),
|
||||
fulltitle = item.fulltitle,
|
||||
show = item.show,
|
||||
url= episode,
|
||||
action= 'findvideos',
|
||||
plot= plot,
|
||||
thumbnail= thumbnail,
|
||||
contentSeason= season_number,
|
||||
contentEpisode= episode_number,
|
||||
infoLabels= infoLabels,
|
||||
contentType= 'episode'))
|
||||
title = ' - ' + episode['title'] if episode.has_key('title') else ''
|
||||
title = '%sx%s%s' % (season_number, episode_number, title)
|
||||
if season_number == item.filter or not item.filterseason:
|
||||
itemlist.append(Item(channel= item.channel,
|
||||
title= format_title(title),
|
||||
fulltitle = item.fulltitle,
|
||||
show = item.show,
|
||||
url= episode,
|
||||
action= 'findvideos',
|
||||
plot= plot,
|
||||
thumbnail= thumbnail,
|
||||
contentSeason= season_number,
|
||||
contentEpisode= episode_number,
|
||||
infoLabels= infoLabels,
|
||||
contentType= 'episode'))
|
||||
|
||||
|
||||
if show_seasons == True and inspect.stack()[1][3] not in ['add_tvshow', 'get_episodes', 'update', 'find_episodes'] and not item.filterseason:
|
||||
|
||||
Reference in New Issue
Block a user