Skip to content

Commit

Permalink
Merge pull request #1191 from CastagnaIT/ep_fix
Browse files Browse the repository at this point in the history
Removed workaround for "1 more item" problem
  • Loading branch information
CastagnaIT authored Jun 18, 2021
2 parents 3ee6754 + 6844f1a commit 0e73da1
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions resources/lib/services/nfsession/session/path_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,9 @@ def perpetual_path_request(self, paths, length_params, perpetual_range_start=Non
# multiple path requests will be executed with forward shifting range selectors
# and the results will be combined into one path response.
response_type, length_args = length_params
context_name = length_args[0]
# context_name = length_args[0]
response_length = apipaths.LENGTH_ATTRIBUTES[response_type]

# Note: when the request is made with 'genres' or 'seasons' context,
# the response strangely does not respect the number of objects
# requested, returning 1 more item, i couldn't understand why
if context_name in ['genres', 'seasons']:
request_size -= 1
response_size = request_size + 1
if context_name in ['genres', 'seasons']:
response_size += 1

number_of_requests = 100 if no_limit_req else int(G.ADDON.getSettingInt('page_results') / 45)
perpetual_range_start = int(perpetual_range_start) if perpetual_range_start else 0
Expand Down

0 comments on commit 0e73da1

Please sign in to comment.