From 9196da93239e9826f84c393e522b379d9922abea Mon Sep 17 00:00:00 2001 From: meisnate12 Date: Wed, 4 Nov 2020 19:25:05 -0500 Subject: [PATCH 1/4] Fix for #87 --- app/imdb_tools.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/imdb_tools.py b/app/imdb_tools.py index a2fc289..842a02b 100644 --- a/app/imdb_tools.py +++ b/app/imdb_tools.py @@ -38,10 +38,10 @@ def imdb_get_movies(config_path, plex, data): "//a/img//@data-tconst") if "/search/" in imdb_url: results = re.search('\\d+-\\d+ of \\d+ titles.', str(r.content)) - total = 100 if results is None else re.findall('(\\d+)', results.group(0))[2] + total = 100 if results is None else re.findall('(\\d+)', results.group(0).replace(',', ''))[2] else: results = re.search('(?<=
).*?(?=
)', str(r.content)) - total = 100 if results is None else re.search('.*?(\\d+)', results.group(0)).group(1) + total = 100 if results is None else re.search('(\\d+)', results.group(0).replace(',', '')).group(1) for i in range(1, math.ceil(int(total) / 100)): try: From 9581fb8e294503385e35604dc68c3e22bdaf0ce1 Mon Sep 17 00:00:00 2001 From: meisnate12 Date: Wed, 4 Nov 2020 19:25:43 -0500 Subject: [PATCH 2/4] Fix for #89 --- app/imdb_tools.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/app/imdb_tools.py b/app/imdb_tools.py index 842a02b..d34df41 100644 --- a/app/imdb_tools.py +++ b/app/imdb_tools.py @@ -272,11 +272,14 @@ def tmdb_get_shows(config_path, plex, data, is_list=False): for mid in t_tvs: match = False tvdb_id = get_tvdb_id_from_tmdb_id(mid) - for t in p_tv_map: - if p_tv_map[t] and "tt" not in p_tv_map[t] != "None": - if int(p_tv_map[t]) == int(tvdb_id): - match = True - break + if tvdb_id is None: + print("| Trakt Error: tmbd ID: {} could not converted to tvdb ID".format(mid)) + else: + for t in p_tv_map: + if p_tv_map[t] and "tt" not in p_tv_map[t] != "None": + if p_tv_map[t] is not None and int(p_tv_map[t]) == int(tvdb_id): + match = True + break if match: matched.append(t) else: @@ -306,7 +309,7 @@ def tvdb_get_shows(config_path, plex, data, is_list=False): match = False for t in p_tv_map: if p_tv_map[t] and "tt" not in p_tv_map[t] != "None": - if int(p_tv_map[t]) == int(id): + if p_tv_map[t] is not None and int(p_tv_map[t]) == int(id): match = True break if match: From d56e030fd07d2061b4569d4c70a23e9c61f3fb48 Mon Sep 17 00:00:00 2001 From: meisnate12 Date: Wed, 4 Nov 2020 19:29:01 -0500 Subject: [PATCH 3/4] Bump to 2.4.2 --- CHANGELOG.md | 5 +++++ README.md | 2 +- app/plex_auto_collections.py | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f9a5d8c..1a9e148 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [2.4.2] - 2020-11-04 - [#90](https://github.com/mza921/Plex-Auto-Collections/pull/90) +### Fixed +- [#87](https://github.com/mza921/Plex-Auto-Collections/issues/87) - 1000+ IMDB Error Fixed +- [#89](https://github.com/mza921/Plex-Auto-Collections/issues/89) - Shouldn't crash when trakt cant find a show + ## [2.4.1] - 2020-11-04 - [#85](https://github.com/mza921/Plex-Auto-Collections/pull/85) ### Fixed - [#84](https://github.com/mza921/Plex-Auto-Collections/pull/84) - IndentationError diff --git a/README.md b/README.md index 8be4975..2eb0164 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Plex Auto Collections -##### Version 2.4.1 +##### Version 2.4.2 Plex Auto Collections is a Python 3 script that works off a configuration file to create/update Plex collections. Collection management with this tool can be automated in a varying degree of customizability. Supports IMDB, TMDb, and Trakt lists as well as built in Plex Searches using actors, genres, year, studio and more. ![https://i.imgur.com/iHAYFIZ.png](https://i.imgur.com/iHAYFIZ.png) diff --git a/app/plex_auto_collections.py b/app/plex_auto_collections.py index a2d805d..5461c21 100644 --- a/app/plex_auto_collections.py +++ b/app/plex_auto_collections.py @@ -794,7 +794,7 @@ def append_collection(config_path, config_update=None): print("| |_| |_|\___|/_\_\ /_/ \_\\\\_,_| \__|\___/ \___|\___/|_||_|\___|\__| \__||_|\___/|_||_|/__/ |") print("| |") print("|===================================================================================================|") -print("| Version 2.4.1") +print("| Version 2.4.2") print("| Locating config...") config_path = None app_dir = os.path.dirname(os.path.abspath(__file__)) From d620d754796ac39b370278b0f9eb4805bbef111e Mon Sep 17 00:00:00 2001 From: meisnate12 Date: Wed, 4 Nov 2020 19:33:57 -0500 Subject: [PATCH 4/4] print edit --- app/imdb_tools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/imdb_tools.py b/app/imdb_tools.py index d34df41..792cca6 100644 --- a/app/imdb_tools.py +++ b/app/imdb_tools.py @@ -273,7 +273,7 @@ def tmdb_get_shows(config_path, plex, data, is_list=False): match = False tvdb_id = get_tvdb_id_from_tmdb_id(mid) if tvdb_id is None: - print("| Trakt Error: tmbd ID: {} could not converted to tvdb ID".format(mid)) + print("| Trakt Error: tmbd_id: {} could not converted to tvdb_id try just using tvdb_id instead".format(mid)) else: for t in p_tv_map: if p_tv_map[t] and "tt" not in p_tv_map[t] != "None":