From 048cd718af36538eb2a4443ee5a9e0f57fe3d130 Mon Sep 17 00:00:00 2001 From: Spoked Date: Sun, 22 Sep 2024 11:20:45 -0400 Subject: [PATCH] fix: mdblist error on imdb_id as NoneType --- src/program/content/mdblist.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/program/content/mdblist.py b/src/program/content/mdblist.py index 3d9046dc..e8785232 100644 --- a/src/program/content/mdblist.py +++ b/src/program/content/mdblist.py @@ -54,7 +54,9 @@ def run(self) -> Generator[MediaItem, None, None]: else: items = list_items_by_url(list, self.settings.api_key) for item in items: - if item and getattr(item, "imdb_id", "").startswith("tt"): + if not item or item.imdb_id is None: + continue + if item.imdb_id.startswith("tt"): items_to_yield.append(MediaItem( {"imdb_id": item.imdb_id, "requested_by": self.key} ))