plugin.video.netflix icon indicating copy to clipboard operation
plugin.video.netflix copied to clipboard

[Lists] Max. 26 entries per list are present

Open asciidisco opened this issue 9 years ago • 13 comments

I´ve restricted the number of fetched entries to be 21 see: https://github.com/asciidisco/plugin.video.netflix/blob/master/resources/lib/NetflixSession.py#L1363

Of course that number isn't well thought through, I´ll bump it to 70 and see how much of an impact that has on response times. Maybe a pagination is needed, which in the end would brake some of Kodis functionality in sorting items. But first, lets give the bumped number of entries a try.

asciidisco avatar Apr 10 '17 13:04 asciidisco

I´ve seen that anything beyond a max. value of 26 returns a 417 status code from Netflix. Therefor we need to change the code to paginate or to do multiple requests depending on the size parameter of the response. A bit tricky & it needs toi be observed well, which is impact this has on response times.

asciidisco avatar Jul 27 '17 11:07 asciidisco

I think the old flix2kodi or the older netflix plugin which used Chrome to play the videos had a way of paginating the output of lists. I think it worked by presenting it to Kodi as sub directories etc...

bhaal2 avatar Aug 21 '17 00:08 bhaal2

Yes, I used Flix2Kodi, and it displays all itens on lists, and have a pagination. It be used something like that?

joaosagrath avatar Aug 21 '17 20:08 joaosagrath

Actually I don't like the idea of paginating (as long as Kodi doesn't come with a proper API/View for that, as I don't like the idea of hacking around it using folder items) components.

The idea I´ve sketched to solve this problem is the following: When the main menu (after the profiles) gets fetched, you get the size of the sublists, using that size (and the knowledge that we can grep max. 26 entries per list) we can determine how many requests we need to do (with which ranges) to determine the exact requests to be made upfront. I´d like to also do those requests in separate thread, e.g. in parallel, so that we have everything in one list (without pagination) & only have a few hundred milliseconds on top.

Why isn't that implemented yet? Because I don't have time to do so, if anyone wants to give it a spin, I´m happy to take the contribution.

asciidisco avatar Aug 22 '17 07:08 asciidisco

I came across this issue as well and found this bug, and thought I would +1 it. I would code it could if I could but would love to see this added in the future :)

skarragallagher avatar Aug 29 '17 07:08 skarragallagher

While I have created some python code in the past, it will take a while to figure out the layout of your code and where everything is happening. But if I do, I will happily try and make it work. But no holding your breath ok :)

bhaal2 avatar Aug 31 '17 01:08 bhaal2

Pagination has been added in 0.11.24, not my favourite solution, but at least something that enables you to access all the content. We need to get in discussion with the Kodi team, as we might need other APIs to implement our dream solution.

asciidisco avatar Sep 11 '17 14:09 asciidisco

EDIT: I have completely removed all trace of the plugin the I can find, it's still doing the same thing. What I had done originally was to add the changes @pinoelefante had originally made when they were first rejected, this allowed me to see up to 40 entries. But for some reason, now I cannot get rid of this behaviour ... I'm stumped.... Going to create a new .kodi folder and start from scratch..

EDIT 2: Still the same behaviour ... I cannot work out what's going on...

I've got the latest code, but for some reason the --- NEXT PAGE --- is not showing up, and I only get a maximum of 40 entries no matter what I am looking at..? I've tried on a number of different skins, different view types.. Same result. Am I missing some config variable?

bhaal2 avatar Sep 12 '17 02:09 bhaal2

you get 40 entries because the addon is showing categories from the netflix homepage. they have about 40 entries. check netflix homepage ;)

pinoelefante avatar Sep 12 '17 07:09 pinoelefante

I never see a --- NEXT PAGE --- once I am inside a category/genre or any list etc.. It only shows the first 40 entries, I was assuming it would be 26 entries per page/folder ?

bhaal2 avatar Sep 12 '17 07:09 bhaal2

i have "My list" with over 120 entries and i see it, In Genres, the addon load categories from the homepage that have about 40 entries. The addon behaviour is the following: it requests next entries until it found nothing. I know if you click on the category name from the homepage you get all the entries and now we are getting only the entries from the homepage. I don't know how to fix this

pinoelefante avatar Sep 12 '17 07:09 pinoelefante

@bhaal2 @pinoelefante That´s nothing I want to be fixed right now as this is the behaviour I desired. I´m not fond of the way pagination can be introduced in Kodi, as well as async operations on views are done. Once we have a fine API to do so, we´re going to "fix" the categories. For now, I´m happy that everything from "My List" can be made accessible.

asciidisco avatar Sep 12 '17 07:09 asciidisco

@asciidisco No worries, I can deal with that. Is Kodi 18 feature frozen now that it's in Alpha?

bhaal2 avatar Sep 12 '17 07:09 bhaal2