From 4b001d86e84fefa9f8a6a46e40ccbcb2e6da380d Mon Sep 17 00:00:00 2001 From: meisnate12 Date: Mon, 30 Sep 2024 10:45:06 -0400 Subject: [PATCH] [54] Adds `item_analyze` item detail (#2249) --- CHANGELOG | 1 + VERSION | 2 +- docs/files/item_updates.md | 2 ++ modules/builder.py | 8 ++++++-- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index ea491243..154c451e 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -13,6 +13,7 @@ Update tmdbapis requirement to 1.2.21 # New Features Introducing the [Kometa Blog](https://blog.kometa.wiki) - a new home for all kometa-related news stories, ranging from showcasing our community creations to providing you with important updates. Added [`letterboxd_user_lists`](https://kometa.wiki/en/latest/files/dynamic_types/#letterboxd-user-lists) Dynamic Collection Type +Added `item_analyze` item detail to analyze each item in a collection # Updates F1 session naming improvements diff --git a/VERSION b/VERSION index 38bffc71..73b06150 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.0.2-build53 +2.0.2-build54 diff --git a/docs/files/item_updates.md b/docs/files/item_updates.md index e779d336..94586d32 100644 --- a/docs/files/item_updates.md +++ b/docs/files/item_updates.md @@ -31,6 +31,7 @@ tags: - item_audio_language - item_subtitle_language - item_subtitle_mode + - item_analyze --- # Item Metadata Updates @@ -55,6 +56,7 @@ All the following attributes update various details of the metadata for every it | `item_assets` | **Description:** Checks your assets folders for assets of every movie/show in the collection
**Default:** `false`
**Values:** `true` or `false` | | `item_refresh` | **Description:** Refreshes the metadata of every movie/show in the collection
**Default:** `false`
**Values:** `true` or `false` | | `item_refresh_delay` | **Description:** Amount of time to wait between each `item_refresh` of every movie/show in the collection
**Default:** `0`
**Values:** Number greater than `0` | +| `item_analyze` | **Description:** Runs Plex's Analyze Operation on every movie/show in the collection
**Default:** `false`
**Values:** `true` or `false` | | `item_tmdb_season_titles` | **Description:** Changes the season titles of every show in the collection to match TMDb
**Default:** `false`
**Values:** `true` or `false` | | `item_episode_sorting`1 | **Description:** Changes the episode sorting of every show in the collection
**Values:**
`default`Library default
`oldest`Oldest first
`newest`Newest first
| | `item_keep_episodes`1 | **Description:** Changes the keep episodes of every show in the collection
**Values:**
`all`All episodes
`5_latest`5 latest episodes
`3_latest`3 latest episodes
`latest`Latest episodes
`past_3`Episodes added in the past 3 days
`past_7`Episodes added in the past 7 days
`past_30`Episodes added in the past 30 days
| diff --git a/modules/builder.py b/modules/builder.py index e9ae880a..8d050530 100644 --- a/modules/builder.py +++ b/modules/builder.py @@ -56,7 +56,7 @@ details = [ collectionless_details = ["collection_order", "plex_collectionless", "label", "label_sync_mode", "test", "item_label"] + \ poster_details + background_details + summary_details + string_details + all_builders item_false_details = ["item_lock_background", "item_lock_poster", "item_lock_title"] -item_bool_details = ["item_tmdb_season_titles", "revert_overlay", "item_assets", "item_refresh"] + item_false_details +item_bool_details = ["item_tmdb_season_titles", "revert_overlay", "item_assets", "item_refresh", "item_analyze"] + item_false_details item_details = ["non_item_remove_label", "item_label", "item_genre", "item_edition", "item_radarr_tag", "item_sonarr_tag", "item_refresh_delay"] + item_bool_details + list(plex.item_advance_keys.keys()) none_details = ["label.sync", "item_label.sync", "item_genre.sync", "radarr_taglist", "sonarr_taglist", "item_edition"] none_builders = ["radarr_tag_list", "sonarr_taglist"] @@ -169,7 +169,7 @@ parts_collection_valid = [ "filters", "plex_all", "plex_search", "trakt_list", "trakt_list_details", "collection_filtering", "collection_mode", "label", "visible_library", "limit", "visible_home", "visible_shared", "show_missing", "save_report", "missing_only_released", "server_preroll", "changes_webhooks", "item_lock_background", "item_lock_poster", "item_lock_title", "item_refresh", "item_refresh_delay", "imdb_list", "imdb_search", - "cache_builders", "url_theme", "file_theme", "item_label", "default_percent", "non_item_remove_label" + "cache_builders", "url_theme", "file_theme", "item_label", "default_percent", "non_item_remove_label", "item_analyze" ] + episode_parts_only + summary_details + poster_details + background_details + string_details playlist_attributes = [ "filters", "name_mapping", "show_filtered", "show_missing", "save_report", "allowed_library_types", "run_definition", @@ -3230,6 +3230,10 @@ class CollectionBuilder: time.sleep(delay) self.library.query(item.refresh) + if "item_analyze" in self.item_details: + logger.info(f"Executing Analyze on {item.title}") + item.analyze() + if self.library.Radarr and tmdb_paths: try: if "item_radarr_tag" in self.item_details: