From efa89f95bfad71d4c412bd8f672f7bcacab61074 Mon Sep 17 00:00:00 2001 From: James Hu Date: Sat, 20 Nov 2021 15:50:17 -0800 Subject: [PATCH 1/3] Add item_lock_art, item_lock_poster item details --- modules/builder.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/modules/builder.py b/modules/builder.py index 03d64e95..40219d09 100644 --- a/modules/builder.py +++ b/modules/builder.py @@ -90,7 +90,8 @@ notification_details = ["collection_creation_webhooks", "collection_addition_web details = ["collection_mode", "collection_order", "collection_level", "collection_minimum", "label"] + boolean_details + string_details + notification_details collectionless_details = ["collection_order", "plex_collectionless", "label", "label_sync_mode", "test"] + \ poster_details + background_details + summary_details + string_details -item_details = ["item_label", "item_radarr_tag", "item_sonarr_tag", "item_overlay", "item_assets", "revert_overlay", "item_refresh"] + list(plex.item_advance_keys.keys()) +item_details = ["item_label", "item_radarr_tag", "item_sonarr_tag", "item_overlay", "item_assets", "revert_overlay", "item_lock_art", "item_lock_poster", "item_refresh"] + \ + list(plex.item_advance_keys.keys()) radarr_details = ["radarr_add", "radarr_add_existing", "radarr_folder", "radarr_monitor", "radarr_search", "radarr_availability", "radarr_quality", "radarr_tag"] sonarr_details = [ "sonarr_add", "sonarr_add_existing", "sonarr_folder", "sonarr_monitor", "sonarr_language", "sonarr_series", @@ -741,7 +742,7 @@ class CollectionBuilder: raise Failed("Each Overlay can only be used once per Library") self.library.overlays.append(method_data) self.item_details[method_name] = method_data - elif method_name in ["item_assets", "revert_overlay", "item_refresh"]: + elif method_name in ["item_assets", "revert_overlay", "item_lock_art", "item_lock_poster", "item_refresh"]: if util.parse(method_name, method_data, datatype="bool", default=False): self.item_details[method_name] = True elif method_name in plex.item_advance_keys: @@ -1834,6 +1835,13 @@ class CollectionBuilder: if getattr(item, key) != options[method_data]: advance_edits[key] = options[method_data] self.library.edit_item(item, item.title, self.collection_level.capitalize(), advance_edits, advanced=True) + # Locking art and poster should come before refreshing since refreshing can change art and poster (i.e. if + # specified to both lock art/poster and refresh, assume that the current art/poster should be kept) + if "item_lock_art" in self.item_details: + item.lockArt() + if "item_lock_poster" in self.item_details: + item.lockPoster() + if "item_refresh" in self.item_details: item.refresh() From ceb96b3553c566ebafa15f8aa66ef872091456e8 Mon Sep 17 00:00:00 2001 From: James Hu Date: Sat, 20 Nov 2021 16:15:45 -0800 Subject: [PATCH 2/3] Rename to background --- modules/builder.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/modules/builder.py b/modules/builder.py index 40219d09..08880c68 100644 --- a/modules/builder.py +++ b/modules/builder.py @@ -90,7 +90,7 @@ notification_details = ["collection_creation_webhooks", "collection_addition_web details = ["collection_mode", "collection_order", "collection_level", "collection_minimum", "label"] + boolean_details + string_details + notification_details collectionless_details = ["collection_order", "plex_collectionless", "label", "label_sync_mode", "test"] + \ poster_details + background_details + summary_details + string_details -item_details = ["item_label", "item_radarr_tag", "item_sonarr_tag", "item_overlay", "item_assets", "revert_overlay", "item_lock_art", "item_lock_poster", "item_refresh"] + \ +item_details = ["item_label", "item_radarr_tag", "item_sonarr_tag", "item_overlay", "item_assets", "revert_overlay", "item_lock_background", "item_lock_poster", "item_refresh"] + \ list(plex.item_advance_keys.keys()) radarr_details = ["radarr_add", "radarr_add_existing", "radarr_folder", "radarr_monitor", "radarr_search", "radarr_availability", "radarr_quality", "radarr_tag"] sonarr_details = [ @@ -742,7 +742,7 @@ class CollectionBuilder: raise Failed("Each Overlay can only be used once per Library") self.library.overlays.append(method_data) self.item_details[method_name] = method_data - elif method_name in ["item_assets", "revert_overlay", "item_lock_art", "item_lock_poster", "item_refresh"]: + elif method_name in ["item_assets", "revert_overlay", "item_lock_background", "item_lock_poster", "item_refresh"]: if util.parse(method_name, method_data, datatype="bool", default=False): self.item_details[method_name] = True elif method_name in plex.item_advance_keys: @@ -1835,9 +1835,10 @@ class CollectionBuilder: if getattr(item, key) != options[method_data]: advance_edits[key] = options[method_data] self.library.edit_item(item, item.title, self.collection_level.capitalize(), advance_edits, advanced=True) - # Locking art and poster should come before refreshing since refreshing can change art and poster (i.e. if - # specified to both lock art/poster and refresh, assume that the current art/poster should be kept) - if "item_lock_art" in self.item_details: + # Locking background and poster should come before refreshing since refreshing can change background/poster + # (i.e. if specified to both lock background/poster and refresh, assume that the current background/poster + # should be kept) + if "item_lock_background" in self.item_details: item.lockArt() if "item_lock_poster" in self.item_details: item.lockPoster() From c5a9a1c4e0af8bd82f996ccedd7ca65dc3abf622 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Nov 2021 04:25:48 +0000 Subject: [PATCH 3/3] Bump plexapi from 4.7.2 to 4.8.0 Bumps [plexapi](https://github.com/pkkid/python-plexapi) from 4.7.2 to 4.8.0. - [Release notes](https://github.com/pkkid/python-plexapi/releases) - [Commits](https://github.com/pkkid/python-plexapi/compare/4.7.2...4.8.0) --- updated-dependencies: - dependency-name: plexapi dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 60537946..1006ae7c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -PlexAPI==4.7.2 +PlexAPI==4.8.0 tmdbv3api==1.7.6 arrapi==1.2.3 lxml==4.6.4