CastagnaIT / plugin.video.netflix

InputStream based Netflix plugin for Kodi
MIT License
1.89k stars 258 forks source link

Wrong response count in lists causes showing "Next page" #1663

Closed Falke-Design closed 6 months ago

Falke-Design commented 6 months ago

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 the requested size. https://github.com/CastagnaIT/plugin.video.netflix/blob/1b7dc6fe5166a0ddc5d86f835d33fa4d44d35b7c/resources/lib/services/nfsession/session/path_requests.py#L75-L77

After parsing in VideoListSorted only two entries are existing, so response_count is counted wrong.

The counting happens here: https://github.com/CastagnaIT/plugin.video.netflix/blob/1b7dc6fe5166a0ddc5d86f835d33fa4d44d35b7c/resources/lib/utils/api_paths.py#L319-L330

The response from the api looks like this: grafik

The issue is now that we have here nested entries with the property reference which contains then the type. But the count logic checks if the type 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: grafik

After: grafik