|
|
@ -553,7 +553,10 @@ class Config:
|
|
|
|
util.print_stacktrace()
|
|
|
|
util.print_stacktrace()
|
|
|
|
logger.error(f"Unknown Error: {e}")
|
|
|
|
logger.error(f"Unknown Error: {e}")
|
|
|
|
|
|
|
|
|
|
|
|
if library.assets_for_all:
|
|
|
|
if library.assets_for_all is True and not test and not requested_collections:
|
|
|
|
|
|
|
|
logger.info("")
|
|
|
|
|
|
|
|
util.separator(f"All {'Movies' if library.is_movie else 'Shows'} Assets Check for {library.name} Library")
|
|
|
|
|
|
|
|
logger.info("")
|
|
|
|
for item in library.get_all():
|
|
|
|
for item in library.get_all():
|
|
|
|
folder = os.path.basename(os.path.dirname(item.locations[0]) if library.is_movie else item.locations[0])
|
|
|
|
folder = os.path.basename(os.path.dirname(item.locations[0]) if library.is_movie else item.locations[0])
|
|
|
|
for ad in library.asset_directory:
|
|
|
|
for ad in library.asset_directory:
|
|
|
@ -797,13 +800,13 @@ class Config:
|
|
|
|
if self.Cache:
|
|
|
|
if self.Cache:
|
|
|
|
ids, expired = self.Cache.get_ids("movie" if library.is_movie else "show", plex_guid=item.guid)
|
|
|
|
ids, expired = self.Cache.get_ids("movie" if library.is_movie else "show", plex_guid=item.guid)
|
|
|
|
elif library.is_movie:
|
|
|
|
elif library.is_movie:
|
|
|
|
for tmdb in movie_map:
|
|
|
|
for tmdb, rating_keys in movie_map.items():
|
|
|
|
if movie_map[tmdb] == item.ratingKey:
|
|
|
|
if item.ratingKey in rating_keys:
|
|
|
|
ids["tmdb"] = tmdb
|
|
|
|
ids["tmdb"] = tmdb
|
|
|
|
break
|
|
|
|
break
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
for tvdb in show_map:
|
|
|
|
for tvdb, rating_keys in show_map.items():
|
|
|
|
if show_map[tvdb] == item.ratingKey:
|
|
|
|
if item.ratingKey in rating_keys:
|
|
|
|
ids["tvdb"] = tvdb
|
|
|
|
ids["tvdb"] = tvdb
|
|
|
|
break
|
|
|
|
break
|
|
|
|
|
|
|
|
|
|
|
@ -859,12 +862,28 @@ class Config:
|
|
|
|
continue
|
|
|
|
continue
|
|
|
|
if isinstance(main_id, list):
|
|
|
|
if isinstance(main_id, list):
|
|
|
|
if id_type == "movie":
|
|
|
|
if id_type == "movie":
|
|
|
|
for m in main_id: movie_map[m] = item.ratingKey
|
|
|
|
for m in main_id:
|
|
|
|
|
|
|
|
if m in movie_map:
|
|
|
|
|
|
|
|
movie_map[m].append(item.ratingKey)
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
movie_map[m] = [item.ratingKey]
|
|
|
|
|
|
|
|
elif id_type == "show":
|
|
|
|
|
|
|
|
for m in main_id:
|
|
|
|
|
|
|
|
if m in show_map:
|
|
|
|
|
|
|
|
show_map[m].append(item.ratingKey)
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
show_map[m] = [item.ratingKey]
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
if id_type == "movie":
|
|
|
|
|
|
|
|
if main_id in movie_map:
|
|
|
|
|
|
|
|
movie_map[main_id].append(item.ratingKey)
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
movie_map[main_id] = [item.ratingKey]
|
|
|
|
elif id_type == "show":
|
|
|
|
elif id_type == "show":
|
|
|
|
for m in main_id: show_map[m] = item.ratingKey
|
|
|
|
if main_id in show_map:
|
|
|
|
|
|
|
|
show_map[main_id].append(item.ratingKey)
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
if id_type == "movie": movie_map[main_id] = item.ratingKey
|
|
|
|
show_map[main_id] = [item.ratingKey]
|
|
|
|
elif id_type == "show": show_map[main_id] = item.ratingKey
|
|
|
|
|
|
|
|
util.print_end(length, f"Processed {len(items)} {'Movies' if library.is_movie else 'Shows'}")
|
|
|
|
util.print_end(length, f"Processed {len(items)} {'Movies' if library.is_movie else 'Shows'}")
|
|
|
|
return movie_map, show_map
|
|
|
|
return movie_map, show_map
|
|
|
|
|
|
|
|
|
|
|
|