mirror of
https://github.com/meisnate12/Plex-Meta-Manager
synced 2024-11-10 06:54:21 +00:00
display fixes
This commit is contained in:
parent
1bf1342797
commit
753f98659e
3 changed files with 4 additions and 9 deletions
|
@ -300,14 +300,11 @@ class Convert:
|
|||
if not tmdb_id and imdb_id:
|
||||
if isinstance(imdb_id, list):
|
||||
tmdb_id = []
|
||||
new_imdb_id = []
|
||||
for imdb in imdb_id:
|
||||
try:
|
||||
tmdb_id.append(self.imdb_to_tmdb(imdb, fail=True))
|
||||
new_imdb_id.append(imdb)
|
||||
except Failed:
|
||||
continue
|
||||
imdb_id = new_imdb_id
|
||||
else:
|
||||
tmdb_id = self.imdb_to_tmdb(imdb_id)
|
||||
if not tmdb_id:
|
||||
|
@ -343,7 +340,7 @@ class Convert:
|
|||
def update_cache(cache_ids, id_type, guid_type):
|
||||
if self.config.Cache:
|
||||
cache_ids = util.compile_list(cache_ids)
|
||||
util.print_end(length, f"Cache | {'^' if expired else '+'} | {item.guid:<46} | {id_type} ID: {cache_ids:<6} | {item.title}")
|
||||
util.print_end(length, f" Cache | {'^' if expired else '+'} | {item.guid:<46} | {id_type} ID: {cache_ids:<6} | {item.title}")
|
||||
self.config.Cache.update_guid_map(guid_type, item.guid, cache_ids, expired)
|
||||
|
||||
if tmdb_id and library.is_movie:
|
||||
|
|
|
@ -478,7 +478,7 @@ class PlexAPI:
|
|||
smart_filter = self.get_collection(collection)._data.attrib.get('content')
|
||||
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
|
||||
search_choices = self.get_search_choices(final_search, title=title)
|
||||
valid_list = []
|
||||
|
@ -488,10 +488,8 @@ class PlexAPI:
|
|||
valid_list.append((value, search_choices[str(value).lower()]))
|
||||
else:
|
||||
valid_list.append(search_choices[str(value).lower()])
|
||||
elif fail:
|
||||
raise Failed(f"Plex Error: {search_name}: {value} not found")
|
||||
else:
|
||||
logger.error(f"Plex Error: {search_name}: {value} not found")
|
||||
raise Failed(f"Plex Error: {search_name}: {value} not found")
|
||||
return valid_list
|
||||
|
||||
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)
|
||||
except BadRequest:
|
||||
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
|
||||
if not isinstance(main_id, list):
|
||||
main_id = [main_id]
|
||||
|
|
Loading…
Reference in a new issue