Skip to content

Commit

Permalink
Fix categories and search (#1198)
Browse files Browse the repository at this point in the history
  • Loading branch information
mediaminister authored Dec 1, 2024
1 parent a8922a8 commit 6910ea5
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions resources/lib/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1147,9 +1147,8 @@ def get_search(keywords, end_cursor=''):
}
if query_string:
search_dict['q'] = query_string
encoded_search = base64.b64encode(dumps(search_dict).encode('utf-8'))

list_id = 'tl-pag-srch|{}#{}'.format(result_type, encoded_search.decode('utf-8'))
list_id = 'tl-pag-srch|o%14|{}|{}%'.format(dumps(search_dict), result_type)
list_id = '#{}'.format(base64.b64encode(list_id.encode('utf-8')).decode('utf-8'))

if entity_type == 'video-program' and not end_cursor:
Expand Down Expand Up @@ -1200,8 +1199,8 @@ def get_programs(category=None, channel=None, keywords=None, end_cursor=''):
}
if query_string:
search_dict['q'] = query_string
encoded_search = base64.b64encode(dumps(search_dict).encode('utf-8'))
list_id = 'tl-pag-srch|{}#{}'.format('watch', encoded_search.decode('utf-8'))

list_id = 'tl-pag-srch|o%14|{}|{}%'.format(dumps(search_dict), 'watch')
list_id = '#{}'.format(base64.b64encode(list_id.encode('utf-8')).decode('utf-8'))

api_data = get_paginated_programs(list_id=list_id, page_size=page_size, end_cursor=end_cursor)
Expand Down

0 comments on commit 6910ea5

Please sign in to comment.