From 79bbd7d2163349bd45b9921fdb58f57f49a6878e Mon Sep 17 00:00:00 2001 From: meisnate12 Date: Tue, 21 Feb 2023 15:32:08 -0500 Subject: [PATCH] [80] remove all batchEdits --- VERSION | 2 +- modules/builder.py | 6 +++--- modules/meta.py | 14 +++++++------- modules/operations.py | 4 ++-- modules/overlay.py | 2 +- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/VERSION b/VERSION index 74071986..a39da249 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.18.3-develop79 +1.18.3-develop80 diff --git a/modules/builder.py b/modules/builder.py index 980a5076..9de9377f 100644 --- a/modules/builder.py +++ b/modules/builder.py @@ -2746,8 +2746,8 @@ class CollectionBuilder: except NotFound: logger.error("Details: Failed to Update Please delete the collection and run again") logger.info("") - else: - self.obj.batchEdits() + #else: + #self.obj.batchEdits() batch_display = "Collection Metadata Edits" if summary and str(summary[1]) != str(self.obj.summary): @@ -2776,7 +2776,7 @@ class CollectionBuilder: logger.info(batch_display) if len(batch_display) > 25: try: - self.obj.saveEdits() + #self.obj.saveEdits() logger.info("Details: have been updated") updated_details.append("Metadata") except NotFound: diff --git a/modules/meta.py b/modules/meta.py index 4894e88c..ee0e4cb7 100644 --- a/modules/meta.py +++ b/modules/meta.py @@ -1338,7 +1338,7 @@ class MetadataFile(DataFile): logger.error(f"Metadata Error: Season: {season_id} not found") continue season_methods = {sm.lower(): sm for sm in season_dict} - season.batchEdits() + #season.batchEdits() add_edit("title", season, season_dict, season_methods) add_edit("summary", season, season_dict, season_methods) add_edit("user_rating", season, season_dict, season_methods, key="userRating", var_type="float") @@ -1372,7 +1372,7 @@ class MetadataFile(DataFile): logger.error(f"Metadata Error: Episode {episode_str} in Season {season_id} not found") continue episode_methods = {em.lower(): em for em in episode_dict} - episode.batchEdits() + #episode.batchEdits() add_edit("title", episode, episode_dict, episode_methods) add_edit("sort_title", episode, episode_dict, episode_methods, key="titleSort") add_edit("content_rating", episode, episode_dict, episode_methods, key="contentRating") @@ -1415,7 +1415,7 @@ class MetadataFile(DataFile): logger.error(f"Metadata Error: episode {episode_id} of season {season_id} not found") continue episode_methods = {em.lower(): em for em in episode_dict} - episode.batchEdits() + #episode.batchEdits() add_edit("title", episode, episode_dict, episode_methods) add_edit("sort_title", episode, episode_dict, episode_methods, key="titleSort") add_edit("content_rating", episode, episode_dict, episode_methods, key="contentRating") @@ -1456,7 +1456,7 @@ class MetadataFile(DataFile): else: logger.error(f"Metadata Error: Album: {album_name} not found") continue - album.batchEdits() + #album.batchEdits() add_edit("title", album, album_dict, album_methods, value=title) add_edit("sort_title", album, album_dict, album_methods, key="titleSort") add_edit("critic_rating", album, album_dict, album_methods, key="rating", var_type="float") @@ -1501,7 +1501,7 @@ class MetadataFile(DataFile): logger.error(f"Metadata Error: Track: {track_num} not found") continue - track.batchEdits() + #track.batchEdits() add_edit("title", track, track_dict, track_methods, value=title) add_edit("user_rating", track, track_dict, track_methods, key="userRating", var_type="float") add_edit("track", track, track_dict, track_methods, key="index", var_type="int") @@ -1561,7 +1561,7 @@ class MetadataFile(DataFile): race = race_lookup[season.seasonNumber] title = race.format_name(round_prefix, shorten_gp) updated = False - season.batchEdits() + #season.batchEdits() add_edit("title", season, value=title) finish_edit(season, f"Season: {title}") _, _, ups = self.library.item_images(season, {}, {}, asset_location=asset_location, title=title, @@ -1572,7 +1572,7 @@ class MetadataFile(DataFile): for episode in season.episodes(): if len(episode.locations) > 0: ep_title, session_date = race.session_info(episode.locations[0], sprint_weekend) - episode.batchEdits() + #episode.batchEdits() add_edit("title", episode, value=ep_title) add_edit("originally_available", episode, key="originallyAvailableAt", var_type="date", value=session_date) finish_edit(episode, f"Season: {season.seasonNumber} Episode: {episode.episodeNumber}") diff --git a/modules/operations.py b/modules/operations.py index 048434d7..3b255fbf 100644 --- a/modules/operations.py +++ b/modules/operations.py @@ -563,7 +563,7 @@ class Operations: logger.info(f"No IMDb ID for Guid: {item.guid}") for ep in item.episodes(): - ep.batchEdits() + #ep.batchEdits() batch_display = "" item_title = self.library.get_item_sort_title(ep, atr="title") logger.info("") @@ -610,7 +610,7 @@ class Operations: batch_display += update_episode_rating(self.library.mass_episode_user_rating_update, "userRating", "User Rating") if len(batch_display) > 0: - ep.saveEdits() + #ep.saveEdits() logger.info(f"Batch Edits:{batch_display}") if self.library.Radarr and self.library.radarr_add_all_existing: diff --git a/modules/overlay.py b/modules/overlay.py index 1b4229dc..2d2273f2 100644 --- a/modules/overlay.py +++ b/modules/overlay.py @@ -142,7 +142,7 @@ class Overlay: self.back_radius = util.parse("Overlay", "back_radius", self.data["back_radius"], datatype="int", parent="overlay") if "back_radius" in self.data and self.data["back_radius"] else None self.back_line_width = util.parse("Overlay", "back_line_width", self.data["back_line_width"], datatype="int", parent="overlay") if "back_line_width" in self.data and self.data["back_line_width"] else None self.back_line_color = color("back_line_color") - self.back_padding = util.parse("Overlay", "back_padding", self.data["back_padding"], datatype="int", parent="overlay", default=0) if "back_padding" in self.data else 0 + self.back_padding = util.parse("Overlay", "back_padding", self.data["back_padding"], datatype="int", parent="overlay", minimum=0, default=0) if "back_padding" in self.data else 0 self.back_align = util.parse("Overlay", "back_align", self.data["back_align"], parent="overlay", default="center", options=["left", "right", "center", "top", "bottom"]) if "back_align" in self.data else "center" self.back_box = None back_width = util.parse("Overlay", "back_width", self.data["back_width"], datatype="int", parent="overlay", minimum=0) if "back_width" in self.data else -1