Skip to content

Commit 7e82824

Browse files
committed
Fixed: item 'ondek meer genres' missing in NPO's 'TV shows'
1 parent 1117e63 commit 7e82824

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

channels/channel.nos/nos2010/chn_nos2010.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,10 @@ def __init__(self, channel_info: ChannelInfo):
151151
name="Bare pages layout", json=True,
152152
parser=["collections"], creator=self.create_api_page_layout)
153153

154+
self._add_data_parser("https://npo.nl/start/api/domain/page-collection?type=dynamic_page&guid=",
155+
name="Categories layout", json=True,
156+
parser=["items"], creator=self.create_api_category_item)
157+
154158
# Favourites (not yet implemented in the site).
155159
self._add_data_parser("https://npo.nl/start/api/domain/user-profiles",
156160
match_type=ParserData.MatchExact, json=True,
@@ -593,6 +597,8 @@ def create_api_page_layout(self, result_set: dict) -> Optional[MediaItem]:
593597
content_type = contenttype.TVSHOWS
594598
elif page_type == "PROGRAM":
595599
content_type = contenttype.EPISODES
600+
elif page_type == "DYNAMIC_PAGE":
601+
content_type = contenttype.VIDEOS
596602
else:
597603
Logger.error(f"Missing for page type: {page_type}")
598604
return None

tests/channel_tests/test_chn_nos2010.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,9 @@ def test_search_video(self):
114114
def test_programs(self):
115115
self._test_folder_url("https://npo.nl/start/api/domain/page-layout?slug=programmas", 5)
116116

117+
def test_more_genres(self):
118+
self._test_folder_url("https://npo.nl/start/api/domain/page-collection?type=dynamic_page&guid=2670b702-d621-44be-b411-7aae3c3820eb", 9)
119+
117120
def test_page(self):
118121
self._test_folder_url("https://npo.nl/start/api/domain/page-collection?type=series&guid=cc065da7-e6d2-44d6-bbce-2d600954e0b0", 10)
119122

0 commit comments

Comments
 (0)