Skip to content

Commit

Permalink
Fixed: NPO 'Recent' items with single items (Fixes #1871).
Browse files Browse the repository at this point in the history
  • Loading branch information
basrieter committed Dec 6, 2024
1 parent 9059849 commit 57b1295
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion channels/channel.nos/nos2010/chn_nos2010.py
Original file line number Diff line number Diff line change
Expand Up @@ -859,7 +859,10 @@ def update_nextjs_video(self, item: MediaItem) -> MediaItem:
next_js_data = Regexer.do_regex(r"__NEXT_DATA__[^>]+>(.+?)</script>", data)[0]
next_js_json = JsonHelper(next_js_data)
data = next_js_json.get_value("props", "pageProps", "dehydratedState", "queries", -1, "state", "data")
p = [p for p in data if p["guid"] == item.metaData["program_guid"]][0]
if isinstance(data, list):
p = [p for p in data if p["guid"] == item.metaData["program_guid"]][0]
else:
p = data
return self.__update_video_item(item, p["productId"])

# noinspection PyUnusedLocal
Expand Down

0 comments on commit 57b1295

Please sign in to comment.