Skip to content

Commit 2a9d02f

Browse files
Use empty string for missing URL
Since URL now can't be "None" use empty string for missing value.
1 parent 826f82f commit 2a9d02f

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/simplejustwatchapi/query.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,9 @@ def _parse_entry(json: Any) -> MediaEntry:
368368
episode_number = content.get("episodeNumber")
369369
title = content.get("title")
370370
url_field = content.get("fullPath")
371-
url = _DETAILS_URL + url_field if url_field else None
371+
# Missing URL should be "None", not an empty string,
372+
# but I want to keep the MediaEntry structure unchanged for now.
373+
url = _DETAILS_URL + url_field if url_field else ""
372374
year = content.get("originalReleaseYear")
373375
date = content.get("originalReleaseDate")
374376
runtime_minutes = content.get("runtime")

0 commit comments

Comments
 (0)