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