Skip to content

Commit

Permalink
Video sorted lists query changes
Browse files Browse the repository at this point in the history
  • Loading branch information
CastagnaIT committed Jul 16, 2021
1 parent 1d9683e commit 1a5de7c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
9 changes: 6 additions & 3 deletions resources/lib/globals.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ class GlobalVariables(object):
'loco_known': True,
'request_context_name': 'mylist',
'view': VIEW_MYLIST,
'has_sort_setting': True}),
'has_sort_setting': True,
'query_without_reference': True}),
('continueWatching', {'path': ['video_list', 'continueWatching'],
'loco_contexts': ['continueWatching'],
'loco_known': True}),
Expand All @@ -111,7 +112,8 @@ class GlobalVariables(object):
'loco_contexts': ['newRelease'],
'loco_known': True,
'request_context_name': 'newrelease',
'has_sort_setting': True}),
'has_sort_setting': True,
'query_without_reference': True}),
('currentTitles', {'path': ['video_list', 'currentTitles'],
'loco_contexts': ['trendingNow'],
'loco_known': True}),
Expand All @@ -134,7 +136,8 @@ class GlobalVariables(object):
'label_id': 30163,
'description_id': 30164,
'icon': 'DefaultTVShows.png',
'has_sort_setting': True}),
'has_sort_setting': True,
'query_without_reference': True}),
('recommendations', {'path': ['recommendations', 'recommendations'],
'loco_contexts': ['similars', 'becauseYouAdded', 'becauseYouLiked', 'watchAgain',
'bigRow'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,11 @@ def req_video_list_sorted(self, context_name, context_id=None, perpetual_range_s
int(G.ADDON.getSettingInt('menu_sortorder_' + menu_data.get('initial_menu_id', menu_data['path'][1])))
]
base_path.append(req_sort_order_type)
paths = build_paths(base_path + [RANGE_PLACEHOLDER], VIDEO_LIST_PARTIAL_PATHS)
_base_path = list(base_path)
_base_path.append(RANGE_PLACEHOLDER)
if not menu_data.get('query_without_reference', False):
_base_path.append('reference')
paths = build_paths(_base_path, VIDEO_LIST_PARTIAL_PATHS)

path_response = self.nfsession.perpetual_path_request(paths, [response_type, base_path], perpetual_range_start)
return VideoListSorted(path_response, context_name, context_id, req_sort_order_type)
Expand Down

0 comments on commit 1a5de7c

Please sign in to comment.