Wrong response count in lists causes showing "Next page" #1663
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Check if this PR fulfills these requirements:
Types of changes
Description
Fixes: #1659
"Lists of all kinds" / "TV show genres" have the "Next page" folder but there are no entries anymore.
This is caused because the
response_count
is higher then therequested size
.plugin.video.netflix/resources/lib/services/nfsession/session/path_requests.py
Lines 75 to 77 in 1b7dc6f
After parsing in
VideoListSorted
only two entries are existing, soresponse_count
is counted wrong.The counting happens here:
plugin.video.netflix/resources/lib/utils/api_paths.py
Lines 319 to 330 in 1b7dc6f
The response from the api looks like this:
The issue is now that we have here nested entries with the property
reference
which contains then thetype
. But the count logic checks if thetype
is a direct child of the entry.That causes that nested entries without reference are counted too.
Solution: remove the nesting and then check if a reference is existing
Screenshots (if appropriate):
Before:
After: