From 65b250ed9280016b1e199ddc8b3875ec5e52dffb Mon Sep 17 00:00:00 2001 From: meisnate12 Date: Tue, 6 Apr 2021 13:55:04 -0400 Subject: [PATCH 1/5] fix sonarr_add error --- modules/sonarr.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/sonarr.py b/modules/sonarr.py index 269360055..38ff9e89f 100644 --- a/modules/sonarr.py +++ b/modules/sonarr.py @@ -93,7 +93,7 @@ def add_tvdb(self, tvdb_ids, **options): folder = options["folder"] if "folder" in options else self.root_folder_path monitor = options["monitor"] if "monitor" in options else self.monitor quality_profile_id = self.get_profile_id(options["quality"], "quality_profile") if "quality" in options else self.quality_profile_id - language_profile_id = self.get_profile_id(options["language"], "language_profile") if "quality" in options else self.quality_profile_id + language_profile_id = self.get_profile_id(options["language"], "language_profile") if "quality" in options else self.language_profile_id series = options["series"] if "series" in options else self.series_type season = options["season"] if "season" in options else self.season_folder tags = options["tag"] if "tag" in options else self.tag From be0495cb4d0d697d36df65774c53a325aef3cacc Mon Sep 17 00:00:00 2001 From: meisnate12 Date: Tue, 6 Apr 2021 14:22:21 -0400 Subject: [PATCH 2/5] add beta version --- plex_meta_manager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plex_meta_manager.py b/plex_meta_manager.py index c6be81147..81796ce89 100644 --- a/plex_meta_manager.py +++ b/plex_meta_manager.py @@ -89,7 +89,7 @@ def fmt_filter(record): util.centered("| __/| | __/> < | | | | __/ || (_| | | | | | (_| | | | | (_| | (_| | __/ | ") util.centered("|_| |_|\\___/_/\\_\\ |_| |_|\\___|\\__\\__,_| |_| |_|\\__,_|_| |_|\\__,_|\\__, |\\___|_| ") util.centered(" |___/ ") -util.centered(" Version: 1.7.1 ") +util.centered(" Version: 1.7.1-beta.1 ") util.separator() if my_tests: From 665358df4c58ab5d5ae9f0de6068a93237c747d8 Mon Sep 17 00:00:00 2001 From: meisnate12 Date: Wed, 7 Apr 2021 20:17:12 -0400 Subject: [PATCH 3/5] fix for #184 --- modules/plex.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/plex.py b/modules/plex.py index 5d7b0d619..47be477ad 100644 --- a/modules/plex.py +++ b/modules/plex.py @@ -685,8 +685,8 @@ def edit_tags(attr, obj, key=None, extra=None, movie_library=False): match = re.search("[Ss]\\d+[Ee]\\d+", episode_str) if match: output = match.group(0)[1:].split("E" if "E" in match.group(0) else "e") - episode_id = int(output[0]) - season_id = int(output[1]) + season_id = int(output[0]) + episode_id = int(output[1]) logger.info(f"Updating episode S{episode_id}E{season_id} of {mapping_name}...") try: episode = item.episode(season=season_id, episode=episode_id) except NotFound: logger.error(f"Metadata Error: episode {episode_id} of season {season_id} not found") From aec4159bbb8e5e5bc8e3f1006050d648245064d8 Mon Sep 17 00:00:00 2001 From: meisnate12 Date: Wed, 7 Apr 2021 20:20:06 -0400 Subject: [PATCH 4/5] small bug fixes --- modules/builder.py | 10 +++++++--- modules/config.py | 2 +- modules/plex.py | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/modules/builder.py b/modules/builder.py index 45a835284..ddcead49a 100644 --- a/modules/builder.py +++ b/modules/builder.py @@ -638,13 +638,13 @@ def get_int(parent, method, data_in, methods_in, default_in, minimum=1, maximum= prefix_list = [] if "exclude_prefix" in dict_methods and method_data[dict_methods["exclude_prefix"]]: if isinstance(method_data[dict_methods["exclude_prefix"]], list): - prefix_list.extend(method_data[dict_methods["exclude_prefix"]]) + prefix_list.extend([exclude for exclude in method_data[dict_methods["exclude_prefix"]] if exclude]) else: prefix_list.append(str(method_data[dict_methods["exclude_prefix"]])) exact_list = [] if "exclude" in dict_methods and method_data[dict_methods["exclude"]]: if isinstance(method_data[dict_methods["exclude"]], list): - exact_list.extend(method_data[dict_methods["exclude"]]) + exact_list.extend([exclude for exclude in method_data[dict_methods["exclude"]] if exclude]) else: exact_list.append(str(method_data[dict_methods["exclude"]])) if len(prefix_list) == 0 and len(exact_list) == 0: @@ -1230,6 +1230,9 @@ def set_image(image_method, images, is_background=False): except BadRequest: logger.error(f"Detail: {image_method} failed to update {message}") + if len(self.posters) > 0: + logger.info("") + if len(self.posters) > 1: logger.info(f"{len(self.posters)} posters found:") for p in self.posters: @@ -1254,7 +1257,8 @@ def set_image(image_method, images, is_background=False): elif "tmdb_show_details" in self.posters: set_image("tmdb_show_details", self.posters) else: logger.info("No poster to update") - logger.info("") + if len(self.backgrounds) > 0: + logger.info("") if len(self.backgrounds) > 1: logger.info(f"{len(self.backgrounds)} backgrounds found:") diff --git a/modules/config.py b/modules/config.py index 3bba2ab2c..ae8450821 100644 --- a/modules/config.py +++ b/modules/config.py @@ -677,7 +677,7 @@ def mass_metadata(self, library, movie_map, show_map): util.print_end(length, str(e)) continue new_genres = [genre.name for genre in tmdb_item.genres] - elif library.mass_genre_update == "omdb": + elif library.mass_genre_update in ["omdb", "imdb"]: if self.OMDb.limit is True: break if "imdb" not in ids: diff --git a/modules/plex.py b/modules/plex.py index 47be477ad..5ce92a85f 100644 --- a/modules/plex.py +++ b/modules/plex.py @@ -12,7 +12,7 @@ logger = logging.getLogger("Plex Meta Manager") -builders = ["plex_all", "plex_collection", "plex_collectionless", "plex_search",] +builders = ["plex_all", "plex_collection", "plex_collectionless", "plex_search"] search_translation = { "audio_language": "audioLanguage", "content_rating": "contentRating", From dcfb4b7295ea5836d3aec8db573c98e09ebd4fe9 Mon Sep 17 00:00:00 2001 From: meisnate12 Date: Wed, 7 Apr 2021 20:20:26 -0400 Subject: [PATCH 5/5] v1.7.2 --- README.md | 2 +- plex_meta_manager.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2b5308a03..8716cb09b 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Plex Meta Manager -#### Version 1.7.1 +#### Version 1.7.2 The original concept for Plex Meta Manager is [Plex Auto Collections](https://github.com/mza921/Plex-Auto-Collections), but this is rewritten from the ground up to be able to include a scheduler, metadata edits, multiple libraries, and logging. Plex Meta Manager is a Python 3 script that can be continuously run using YAML configuration files to update on a schedule the metadata of the movies, shows, and collections in your libraries as well as automatically build collections based on various methods all detailed in the wiki. Some collection examples that the script can automatically build and update daily include Plex Based Searches like actor, genre, or studio collections or Collections based on TMDb, IMDb, Trakt, TVDb, AniDB, or MyAnimeList lists and various other services. diff --git a/plex_meta_manager.py b/plex_meta_manager.py index 81796ce89..d4b5e3f67 100644 --- a/plex_meta_manager.py +++ b/plex_meta_manager.py @@ -89,7 +89,7 @@ def fmt_filter(record): util.centered("| __/| | __/> < | | | | __/ || (_| | | | | | (_| | | | | (_| | (_| | __/ | ") util.centered("|_| |_|\\___/_/\\_\\ |_| |_|\\___|\\__\\__,_| |_| |_|\\__,_|_| |_|\\__,_|\\__, |\\___|_| ") util.centered(" |___/ ") -util.centered(" Version: 1.7.1-beta.1 ") +util.centered(" Version: 1.7.2 ") util.separator() if my_tests: