Skip to content

Commit

Permalink
fix: mdblist nonetype on imdb_id
Browse files Browse the repository at this point in the history
  • Loading branch information
dreulavelle committed Sep 22, 2024
1 parent 375302e commit 10f1044
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/program/content/mdblist.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ 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 hasattr(item, "imdb_id") and item.imdb_id.startswith("tt"):
if item and getattr(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 10f1044

Please sign in to comment.