python-plexapi icon indicating copy to clipboard operation
python-plexapi copied to clipboard

Use pagination for `/all` endpoints

Open JonnyWong16 opened this issue 3 years ago • 0 comments

Description

PMS 1.28 displays the following warning message in the logs whenever the /library/section/<librarySectionID>/all endpoint is called without pagination using X-Plex-Container-Size.

Missing X-Plex-Container-Size header. This will fail with status code 400 in the future.

This changes LibrarySection.get(), Artist.album(), and Artist.albums() to use LibrarySection.search() which already has pagination implemented using the /all endpoint. A NotFound exception is re-raised where necessary to maintain the same behaviour as before. There should be no impact for the user.

Type of change

Please delete options that are not relevant.

  • [x] Bug fix (non-breaking change which fixes an issue)

Checklist:

  • [x] My code follows the style guidelines of this project
  • [x] I have performed a self-review of my own code
  • [ ] I have commented my code, particularly in hard-to-understand areas
  • [ ] I have added or updated the docstring for new or existing methods
  • [ ] I have added tests when applicable (No changes to tests required)

JonnyWong16 avatar Jul 24 '22 21:07 JonnyWong16