|
|
@ -216,6 +216,8 @@ class CollectionBuilder:
|
|
|
|
self.missing_movies = []
|
|
|
|
self.missing_movies = []
|
|
|
|
self.missing_shows = []
|
|
|
|
self.missing_shows = []
|
|
|
|
self.missing_parts = []
|
|
|
|
self.missing_parts = []
|
|
|
|
|
|
|
|
self.added_to_radarr = []
|
|
|
|
|
|
|
|
self.added_to_sonarr = []
|
|
|
|
self.builders = []
|
|
|
|
self.builders = []
|
|
|
|
self.filters = []
|
|
|
|
self.filters = []
|
|
|
|
self.tmdb_filters = []
|
|
|
|
self.tmdb_filters = []
|
|
|
@ -1976,7 +1978,9 @@ class CollectionBuilder:
|
|
|
|
if self.library.Radarr:
|
|
|
|
if self.library.Radarr:
|
|
|
|
if self.radarr_details["add_missing"]:
|
|
|
|
if self.radarr_details["add_missing"]:
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
added_to_radarr += self.library.Radarr.add_tmdb(missing_tmdb_ids, **self.radarr_details)
|
|
|
|
added = self.library.Radarr.add_tmdb(missing_tmdb_ids, **self.radarr_details)
|
|
|
|
|
|
|
|
self.added_to_radarr.extend([movie.tmdbId for movie in added])
|
|
|
|
|
|
|
|
added_to_radarr += len(added)
|
|
|
|
except Failed as e:
|
|
|
|
except Failed as e:
|
|
|
|
logger.error(e)
|
|
|
|
logger.error(e)
|
|
|
|
if "item_radarr_tag" in self.item_details:
|
|
|
|
if "item_radarr_tag" in self.item_details:
|
|
|
@ -2015,7 +2019,9 @@ class CollectionBuilder:
|
|
|
|
if self.library.Sonarr:
|
|
|
|
if self.library.Sonarr:
|
|
|
|
if self.sonarr_details["add_missing"]:
|
|
|
|
if self.sonarr_details["add_missing"]:
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
added_to_sonarr += self.library.Sonarr.add_tvdb(missing_tvdb_ids, **self.sonarr_details)
|
|
|
|
added = self.library.Sonarr.add_tvdb(missing_tvdb_ids, **self.sonarr_details)
|
|
|
|
|
|
|
|
self.added_to_sonarr.extend([show.tvdbId for show in added])
|
|
|
|
|
|
|
|
added_to_sonarr += len(added)
|
|
|
|
except Failed as e:
|
|
|
|
except Failed as e:
|
|
|
|
logger.error(e)
|
|
|
|
logger.error(e)
|
|
|
|
if "item_sonarr_tag" in self.item_details:
|
|
|
|
if "item_sonarr_tag" in self.item_details:
|
|
|
@ -2142,13 +2148,15 @@ class CollectionBuilder:
|
|
|
|
if "item_radarr_tag" in self.item_details:
|
|
|
|
if "item_radarr_tag" in self.item_details:
|
|
|
|
self.library.Radarr.edit_tags([t[0] if isinstance(t, tuple) else t for t in tmdb_paths], self.item_details["item_radarr_tag"], self.item_details["apply_tags"])
|
|
|
|
self.library.Radarr.edit_tags([t[0] if isinstance(t, tuple) else t for t in tmdb_paths], self.item_details["item_radarr_tag"], self.item_details["apply_tags"])
|
|
|
|
if self.radarr_details["add_existing"]:
|
|
|
|
if self.radarr_details["add_existing"]:
|
|
|
|
self.library.Radarr.add_tmdb(tmdb_paths, **self.radarr_details)
|
|
|
|
added = self.library.Radarr.add_tmdb(tmdb_paths, **self.radarr_details)
|
|
|
|
|
|
|
|
self.added_to_radarr.extend([movie.tmdbId for movie in added])
|
|
|
|
|
|
|
|
|
|
|
|
if self.library.Sonarr and tvdb_paths:
|
|
|
|
if self.library.Sonarr and tvdb_paths:
|
|
|
|
if "item_sonarr_tag" in self.item_details:
|
|
|
|
if "item_sonarr_tag" in self.item_details:
|
|
|
|
self.library.Sonarr.edit_tags([t[0] if isinstance(t, tuple) else t for t in tvdb_paths], self.item_details["item_sonarr_tag"], self.item_details["apply_tags"])
|
|
|
|
self.library.Sonarr.edit_tags([t[0] if isinstance(t, tuple) else t for t in tvdb_paths], self.item_details["item_sonarr_tag"], self.item_details["apply_tags"])
|
|
|
|
if self.sonarr_details["add_existing"]:
|
|
|
|
if self.sonarr_details["add_existing"]:
|
|
|
|
self.library.Sonarr.add_tvdb(tvdb_paths, **self.sonarr_details)
|
|
|
|
added = self.library.Sonarr.add_tvdb(tvdb_paths, **self.sonarr_details)
|
|
|
|
|
|
|
|
self.added_to_sonarr.extend([show.tvdbId for show in added])
|
|
|
|
|
|
|
|
|
|
|
|
for rating_key in rating_keys:
|
|
|
|
for rating_key in rating_keys:
|
|
|
|
try:
|
|
|
|
try:
|
|
|
@ -2426,6 +2434,8 @@ class CollectionBuilder:
|
|
|
|
deleted=self.deleted,
|
|
|
|
deleted=self.deleted,
|
|
|
|
additions=self.notification_additions,
|
|
|
|
additions=self.notification_additions,
|
|
|
|
removals=self.notification_removals,
|
|
|
|
removals=self.notification_removals,
|
|
|
|
|
|
|
|
radarr=self.added_to_radarr,
|
|
|
|
|
|
|
|
sonarr=self.added_to_sonarr,
|
|
|
|
playlist=playlist
|
|
|
|
playlist=playlist
|
|
|
|
)
|
|
|
|
)
|
|
|
|
except Failed as e:
|
|
|
|
except Failed as e:
|
|
|
@ -2439,6 +2449,8 @@ class CollectionBuilder:
|
|
|
|
rating_keys = []
|
|
|
|
rating_keys = []
|
|
|
|
amount_added = 0
|
|
|
|
amount_added = 0
|
|
|
|
self.notification_additions = []
|
|
|
|
self.notification_additions = []
|
|
|
|
|
|
|
|
self.added_to_radarr = []
|
|
|
|
|
|
|
|
self.added_to_sonarr = []
|
|
|
|
for mm in self.run_again_movies:
|
|
|
|
for mm in self.run_again_movies:
|
|
|
|
if mm in self.library.movie_map:
|
|
|
|
if mm in self.library.movie_map:
|
|
|
|
rating_keys.extend(self.library.movie_map[mm])
|
|
|
|
rating_keys.extend(self.library.movie_map[mm])
|
|
|
|