From 964d252f2bdb7b316997d976ae3318ca69734d37 Mon Sep 17 00:00:00 2001 From: Bas Rieter Date: Sun, 5 Nov 2023 20:25:48 +0100 Subject: [PATCH] Fixed: Premium indicator for TV4. --- channels/channel.se/tv4se/chn_tv4se.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/channels/channel.se/tv4se/chn_tv4se.py b/channels/channel.se/tv4se/chn_tv4se.py index 509f0b82..1c0c8fa6 100644 --- a/channels/channel.se/tv4se/chn_tv4se.py +++ b/channels/channel.se/tv4se/chn_tv4se.py @@ -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) @@ -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", "")