Skip to content

Commit 51cbe15

Browse files
emilywotrubaElectronic-Mango
authored andcommitted
removed default 0 from element_count
It was causing the `element_count` to always be `0`, even when the key was defined
1 parent a59fd65 commit 51cbe15

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/simplejustwatchapi/query.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ class Offer(NamedTuple):
201201
url: str
202202
"""URL to this offer."""
203203

204-
element_count: int
204+
element_count: int | None
205205
"""Element count, usually 0."""
206206

207207
available_to: str | None
@@ -502,7 +502,7 @@ def _parse_offer(json: any) -> Offer:
502502
type = json.get("type")
503503
package = _parse_package(json["package"])
504504
url = json.get("standardWebURL")
505-
element_count = json.get("elementCount", 0)
505+
element_count = json.get("elementCount")
506506
available_to = json.get("availableTo")
507507
deeplink_roku = json.get("deeplinkRoku")
508508
subtitle_languages = json.get("subtitleLanguages")

0 commit comments

Comments
 (0)