From 7d81014219ad6538ae132f7b42465c1bbd22e39f Mon Sep 17 00:00:00 2001 From: Bas Rieter Date: Mon, 20 Nov 2023 00:48:19 +0100 Subject: [PATCH] Changed: Let's fix the API issue that NPO has and not show items that should not be free due to time restrictions. --- channels/channel.nos/nos2010/chn_nos2010.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/channels/channel.nos/nos2010/chn_nos2010.py b/channels/channel.nos/nos2010/chn_nos2010.py index f55b5436..db9e1289 100644 --- a/channels/channel.nos/nos2010/chn_nos2010.py +++ b/channels/channel.nos/nos2010/chn_nos2010.py @@ -668,7 +668,10 @@ def create_api_episode_item(self, result_set: dict, show_info: bool = False) -> till = DateHelper.get_date_from_posix(till_stamp, tz=pytz.UTC) if till_stamp and till < datetime.datetime.now(tz=pytz.UTC): item.isPaid = True - break + # break + # Due to a bug in the NPO API, this content could be viewed for free. + # for now we just don't show it. + return None item.isPaid = False # Always stop after a "free" break