Skip to content

Commit

Permalink
fix: mdblist error on imdb_id as NoneType
Browse files Browse the repository at this point in the history
  • Loading branch information
dreulavelle committed Sep 22, 2024
1 parent 8d526a8 commit 048cd71
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/program/content/mdblist.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}
))
Expand Down

0 comments on commit 048cd71

Please sign in to comment.