Skip to content

Commit

Permalink
Fix categories (#1143)
Browse files Browse the repository at this point in the history
  • Loading branch information
mediaminister authored Dec 18, 2023
1 parent 5ea3a54 commit 87c0250
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions resources/lib/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1608,8 +1608,8 @@ def get_online_categories():
data = dumps(payload).encode('utf-8')
categories_json = get_url_json(url=GRAPHQL_URL, cache=None, headers=headers, data=data, raise_errors='all')
if categories_json is not None:
content_types = find_entry(categories_json.get('data').get('uiSearch'), 'title', 'Aanbod').get('items')
genres = find_entry(categories_json.get('data').get('uiSearch'), 'title', 'Genres').get('items')
content_types = find_entry(categories_json.get('data').get('uiSearch'), 'listId', 'initialsearchcontenttypes').get('items')
genres = find_entry(categories_json.get('data').get('uiSearch'), 'listId', 'initialsearchgenres').get('items')
category_items = content_types + genres
for category in category_items:
# Don't add audio-only categories
Expand Down

0 comments on commit 87c0250

Please sign in to comment.