display fixes

pull/240/head
meisnate12 4 years ago
parent 1bf1342797
commit 753f98659e

@ -300,14 +300,11 @@ class Convert:
if not tmdb_id and imdb_id: if not tmdb_id and imdb_id:
if isinstance(imdb_id, list): if isinstance(imdb_id, list):
tmdb_id = [] tmdb_id = []
new_imdb_id = []
for imdb in imdb_id: for imdb in imdb_id:
try: try:
tmdb_id.append(self.imdb_to_tmdb(imdb, fail=True)) tmdb_id.append(self.imdb_to_tmdb(imdb, fail=True))
new_imdb_id.append(imdb)
except Failed: except Failed:
continue continue
imdb_id = new_imdb_id
else: else:
tmdb_id = self.imdb_to_tmdb(imdb_id) tmdb_id = self.imdb_to_tmdb(imdb_id)
if not tmdb_id: if not tmdb_id:

@ -478,7 +478,7 @@ class PlexAPI:
smart_filter = self.get_collection(collection)._data.attrib.get('content') smart_filter = self.get_collection(collection)._data.attrib.get('content')
return smart_filter[smart_filter.index("?"):] return smart_filter[smart_filter.index("?"):]
def validate_search_list(self, data, search_name, title=True, pairs=False, fail=True): def validate_search_list(self, data, search_name, title=True, pairs=False):
final_search = search_translation[search_name] if search_name in search_translation else search_name final_search = search_translation[search_name] if search_name in search_translation else search_name
search_choices = self.get_search_choices(final_search, title=title) search_choices = self.get_search_choices(final_search, title=title)
valid_list = [] valid_list = []
@ -488,10 +488,8 @@ class PlexAPI:
valid_list.append((value, search_choices[str(value).lower()])) valid_list.append((value, search_choices[str(value).lower()]))
else: else:
valid_list.append(search_choices[str(value).lower()]) valid_list.append(search_choices[str(value).lower()])
elif fail:
raise Failed(f"Plex Error: {search_name}: {value} not found")
else: else:
logger.error(f"Plex Error: {search_name}: {value} not found") raise Failed(f"Plex Error: {search_name}: {value} not found")
return valid_list return valid_list
def get_collection(self, data): def get_collection(self, data):

@ -214,7 +214,7 @@ def map_guids(config, library):
id_type, main_id = config.Convert.get_id(item, library, length) id_type, main_id = config.Convert.get_id(item, library, length)
except BadRequest: except BadRequest:
util.print_stacktrace() util.print_stacktrace()
util.print_end(length, f"{'Cache | ! |' if config.Cache else 'Mapping Error:'} | {item.guid} for {item.title} not found") util.print_end(length, f"Mapping Error: | {item.guid} for {item.title} not found")
continue continue
if not isinstance(main_id, list): if not isinstance(main_id, list):
main_id = [main_id] main_id = [main_id]

Loading…
Cancel
Save