Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add X-Plex-Container-Size to watchlist call and set to maximum #2123

Open
wants to merge 1 commit into
base: python3-beta
Choose a base branch
from

Conversation

VossenTech
Copy link

@VossenTech VossenTech commented Nov 6, 2024

Current watchlist api call is limited to 20 items by default, adding X-Plex-Container-Size header allows a larger number to be provided. I have set it to 300 as that is the maximum plex will accept

@croneter
Copy link
Owner

Thanks @VossenTech for wanting to contribute.

However, this is not how X-Plex-Container-Size works. Your code would currently only return 300 elements. And then nothing. If someone has more elements than 300, these will never be returned (well, ok, bit unlikely but still). Take a look at plex_functions.DownloadChunks(url) - that's what you want to implement.

What are you trying to fix anyway? Kodi only showing 20 elements in a list? Then my guess is that this is NOT caused by PKC/Plex but by Kodi and the way your widgets are set-up. Some of them "feature" a hard cut-off after X (e.g. X=20) elements.

@VossenTech
Copy link
Author

Yes what I am trying to fix is Kodi only showing 20 elements in a list, if the limit was caused by Kodi widget setup then I would expect adding X-Plex-Container-Size to have no effect, however after adding it all of my watchlist (35ish items) are shown. I would also expect that going to Add-Ons>PKC>Watchlist would show the entire watchlist regardless of specific Kodi settings (please correct me if I'm wrong), but it was showing the same limited list.

I did realize that it would be limited to 300 and figured it was better than being limited to 20 for the time being. I will look into DownloadChunks/pagination when I have some time to come back to this.

Also thanks for your work on this awesome app that I have been using for many years

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants