add titles to radarr/sonarr webhooks

pull/659/head
meisnate12 3 years ago
parent ae662e8f46
commit e8fe21d296

@ -1984,7 +1984,7 @@ class CollectionBuilder:
if self.radarr_details["add_missing"]: if self.radarr_details["add_missing"]:
try: try:
added = 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]) self.added_to_radarr.extend([{"title": movie.title, "id": movie.tmdbId} for movie in added])
added_to_radarr += len(added) added_to_radarr += len(added)
except Failed as e: except Failed as e:
logger.error(e) logger.error(e)
@ -2025,7 +2025,7 @@ class CollectionBuilder:
if self.sonarr_details["add_missing"]: if self.sonarr_details["add_missing"]:
try: try:
added = 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]) self.added_to_sonarr.extend([{"title": show.title, "id": show.tvdbId} for show in added])
added_to_sonarr += len(added) added_to_sonarr += len(added)
except Failed as e: except Failed as e:
logger.error(e) logger.error(e)
@ -2154,14 +2154,14 @@ class CollectionBuilder:
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"]:
added = 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]) self.added_to_radarr.extend([{"title": movie.title, "id": 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"]:
added = 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]) self.added_to_sonarr.extend([{"title": show.title, "id": show.tvdbId} for show in added])
for rating_key in rating_keys: for rating_key in rating_keys:
try: try:

Loading…
Cancel
Save