python-plexapi
python-plexapi copied to clipboard
Add support for managed hubs and collection visibility
Description
Added methods to get collection visibility and to be able to set the collection's visibility
Type of change
Please delete options that are not relevant.
- [x] New feature (non-breaking change which adds functionality)
- [x] This change requires a documentation update
Checklist:
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have added or updated the docstring for new or existing methods
- [x] I have added tests when applicable
Test should be added.
Thanks for all the feedback I'll dive into this over the weekend and make all the changes you requested
@JonnyWong16 Updated with your changes and added the ability to grab/reset all managed hubs. I attempted to add some tests for collection visibility but the test is just getting a Not Found Response plexapi.exceptions.NotFound: (404) not_found; http://127.0.0.1:32400/hubs/sections/1/manage?metadataItemId=86 <html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>
The only way I was able to get a 404 Not Found Response if i give the url an invalid section ID which should be acquired automatically by the module. Im not realyl sure what to do to fix the test and i was hoping you had some insight
It might be because collection visibility option require Plex Pass so it will fail for the unclaimed tests.
- Add another unclaimed test using one of the standard manage hubs (like Recently Added).
- Mark your collection test with
@pytest.mark.authenticatedso it will only run during the claimed tests which has Plex Pass.
It looks like unclaimed servers do not have recommendations at all, so the library test also needs to be marked as authenticated.

i dont mind all the comments at all. All your updates should be in and the tests have passed let me know if you need me to do anything else.
let me know if theres any more changes you need me to make
Looks good!