|
|
@ -378,9 +378,27 @@ class Library(ABC):
|
|
|
|
id_type, main_id, imdb_id = self.config.Convert.get_id(item, self)
|
|
|
|
id_type, main_id, imdb_id = self.config.Convert.get_id(item, self)
|
|
|
|
if main_id:
|
|
|
|
if main_id:
|
|
|
|
if id_type == "movie":
|
|
|
|
if id_type == "movie":
|
|
|
|
|
|
|
|
if len(main_id) > 1:
|
|
|
|
|
|
|
|
for _id in main_id:
|
|
|
|
|
|
|
|
try:
|
|
|
|
|
|
|
|
self.config.TMDb.get_movie(_id)
|
|
|
|
|
|
|
|
self.movie_rating_key_map[key] = _id
|
|
|
|
|
|
|
|
break
|
|
|
|
|
|
|
|
except Failed:
|
|
|
|
|
|
|
|
pass
|
|
|
|
|
|
|
|
else:
|
|
|
|
self.movie_rating_key_map[key] = main_id[0]
|
|
|
|
self.movie_rating_key_map[key] = main_id[0]
|
|
|
|
util.add_dict_list(main_id, key, self.movie_map)
|
|
|
|
util.add_dict_list(main_id, key, self.movie_map)
|
|
|
|
elif id_type == "show":
|
|
|
|
elif id_type == "show":
|
|
|
|
|
|
|
|
if len(main_id) > 1:
|
|
|
|
|
|
|
|
for _id in main_id:
|
|
|
|
|
|
|
|
try:
|
|
|
|
|
|
|
|
self.config.Convert.tvdb_to_tmdb(_id, fail=True)
|
|
|
|
|
|
|
|
self.show_rating_key_map[key] = _id
|
|
|
|
|
|
|
|
break
|
|
|
|
|
|
|
|
except Failed:
|
|
|
|
|
|
|
|
pass
|
|
|
|
|
|
|
|
else:
|
|
|
|
self.show_rating_key_map[key] = main_id[0]
|
|
|
|
self.show_rating_key_map[key] = main_id[0]
|
|
|
|
util.add_dict_list(main_id, key, self.show_map)
|
|
|
|
util.add_dict_list(main_id, key, self.show_map)
|
|
|
|
if imdb_id:
|
|
|
|
if imdb_id:
|
|
|
|