From c2badff8e286fafb6c2298d86f3e4e9d626948f3 Mon Sep 17 00:00:00 2001 From: meisnate12 Date: Thu, 5 Aug 2021 11:18:00 -0400 Subject: [PATCH] fixed int error --- modules/cache.py | 3 ++- modules/convert.py | 2 +- plex_meta_manager.py | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/cache.py b/modules/cache.py index 562d1a39..eaeab55d 100644 --- a/modules/cache.py +++ b/modules/cache.py @@ -1,6 +1,7 @@ import logging, os, random, sqlite3 from contextlib import closing from datetime import datetime, timedelta +from modules.util import Failed logger = logging.getLogger("Plex Meta Manager") @@ -108,7 +109,7 @@ class Cache: row = cursor.fetchone() if row: time_between_insertion = datetime.now() - datetime.strptime(row["expiration_date"], "%Y-%m-%d") - id_to_return = int(row["t_id"]) + id_to_return = util.get_list(row["t_id"], int_list=True) media_type = row["media_type"] expired = time_between_insertion.days > self.expiration return id_to_return, media_type, expired diff --git a/modules/convert.py b/modules/convert.py index 578f0c88..7cdd3680 100644 --- a/modules/convert.py +++ b/modules/convert.py @@ -241,7 +241,7 @@ class Convert: cache_id, media_type, expired = self.config.Cache.query_guid_map(item.guid) if cache_id and not expired: media_id_type = "movie" if "movie" in media_type else "show" - return media_id_type, util.get_list(cache_id, int_list=True) + return media_id_type, cache_id try: guid = requests.utils.urlparse(item.guid) item_type = guid.scheme.split(".")[-1] diff --git a/plex_meta_manager.py b/plex_meta_manager.py index c5a346e0..71dc9f32 100644 --- a/plex_meta_manager.py +++ b/plex_meta_manager.py @@ -268,9 +268,9 @@ def mass_metadata(config, library, items): t_id, guid_media_type, _ = config.Cache.query_guid_map(item.guid) if t_id: if "movie" in guid_media_type: - tmdb_id = t_id + tmdb_id = t_id[0] else: - tvdb_id = t_id + tvdb_id = t_id[0] if not tmdb_id and not tvdb_id: tmdb_id = library.get_tmdb_from_map(item) if not tmdb_id and not tvdb_id and library.is_show: