KoD 1.7.4

- Nuove visualizzazioni Server\n- Fix Gestione Viste\n- Aggiunto Pluto TV\n- Fix e migliorie varie\n\n
This commit is contained in:
marco
2022-02-12 12:54:50 +01:00
parent fa99565e9f
commit 41e0823f62
86 changed files with 1660 additions and 3471 deletions
+11 -15
View File
@@ -393,18 +393,17 @@ def set_infoLabels_item(item, seekTmdb=True, search_language=def_lang):
if search_type == 'tv':
# Serial search by title and filtering your results if necessary
searched_title = scrapertools.unescape(item.infoLabels['tvshowtitle'])
# searched_title = searched_title.split('-')[0].strip()
otmdb = Tmdb(searched_text=searched_title, search_type=search_type,
search_language=search_language, filtro=item.infoLabels.get('filtro', {}),
year=item.infoLabels['year'])
else:
# Movie search by title ...
# if item.infoLabels['year'] or item.infoLabels['filtro']:
# ...and year or filter
searched_title = scrapertools.unescape(item.infoLabels['title'])
# searched_title = searched_title.split('-')[0].strip()
# from core.support import dbg;dbg()
otmdb = Tmdb(searched_text=searched_title, search_type=search_type, search_language=search_language,
filtro=item.infoLabels.get('filtro', {}), year=item.infoLabels['year'])
if otmdb is not None and not otmdb.get_id():
otmdb = Tmdb(searched_text=searched_title, search_type=search_type, search_language=search_language,
filtro=item.infoLabels.get('filtro', {}), year=item.infoLabels['year'])
filtro=item.infoLabels.get('filtro', {}))
if otmdb is not None:
if otmdb.get_id() and config.get_setting("tmdb_plus_info", default=False):
# If the search has been successful and you are not looking for a list of items,
@@ -471,10 +470,9 @@ def find_and_set_infoLabels(item):
item.infoLabels['year'] = year[1:-1]
if not item.infoLabels.get("tmdb_id") or not item.infoLabels.get("tmdb_id")[0].isdigit():
if not item.infoLabels.get("imdb_id"):
otmdb_global = Tmdb(searched_text=scrapertools.unescape(title), search_type=search_type, year=item.infoLabels['year'])
else:
otmdb_global = Tmdb(external_id=item.infoLabels.get("imdb_id"), external_source="imdb_id", search_type=search_type)
if item.infoLabels.get("imdb_id"): otmdb_global = Tmdb(external_id=item.infoLabels.get("imdb_id"), external_source="imdb_id", search_type=search_type)
else: otmdb_global = Tmdb(searched_text=scrapertools.unescape(title), search_type=search_type, year=item.infoLabels['year'])
elif not otmdb_global or str(otmdb_global.result.get("id")) != item.infoLabels['tmdb_id']:
otmdb_global = Tmdb(id_Tmdb=item.infoLabels['tmdb_id'], search_type=search_type, search_language=def_lang)
@@ -537,10 +535,7 @@ def get_nfo(item, search_groups=False):
info_nfo = 'https://www.themoviedb.org/tv/{}/episode_group/{}'.format(item.infoLabels['tmdb_id'], Id)
return info_nfo + '\n'
else: return
# from core.support import dbg;dbg()
# if "season" in item.infoLabels and "episode" in item.infoLabels:
# info_nfo = "https://www.themoviedb.org/tv/{}/season/{}/episode/{}" .format(item.infoLabels['tmdb_id'], item.contentSeason, item.contentEpisodeNumber)
# else:
info_nfo = ', '.join(item.infoLabels['url_scraper'])
return info_nfo + '\n'
@@ -644,10 +639,11 @@ class ResultDictDefault(dict):
def __missing__(self, key):
"""
default values in case the requested key does not exist
default values in case the requested key does not exist
"""
if key in ['genre_ids', 'genre', 'genres']:
return list()
elif key == 'images_posters':
posters = dict()
if 'images' in list(super(ResultDictDefault, self).keys()) and 'posters' in super(ResultDictDefault, self).__getitem__('images'):