Skip to content

Commit

Permalink
Fixed: Premium indicator for TV4.
Browse files Browse the repository at this point in the history
  • Loading branch information
basrieter committed Nov 5, 2023
1 parent b779eb1 commit 964d252
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions channels/channel.se/tv4se/chn_tv4se.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,8 +351,7 @@ def create_api_clip(self, result_set: dict) -> Optional[MediaItem]:

item = MediaItem(title, url, media_type=mediatype.VIDEO)
item = self.__update_base_typed_item(item, result_set)
item.isPaid = not JsonHelper.get_from(
result_set, "clipVideo", "access", "hasAccess", fallback=True)
item.isPaid = result_set.get("upsell") is not None
item.isLive = result_set.get("isLiveContent", False)

duration = JsonHelper.get_from(result_set, "clipVideo", "duration", "seconds", fallback=0)
Expand All @@ -371,8 +370,7 @@ def create_api_episode(self, result_set: dict) -> Optional[MediaItem]:
item = MediaItem(title, url, media_type=mediatype.MOVIE)
item = self.__update_base_typed_item(item, result_set)
item.isGeoLocked = True
item.isPaid = not JsonHelper.get_from(
result_set, "video", "access", "hasAccess", fallback=True)
item.isPaid = result_set.get("upsell") is not None
item.isLive = result_set.get("isLiveContent", False)
item.description = result_set.get("synopsis", {}).get("medium", "")

Expand Down

0 comments on commit 964d252

Please sign in to comment.