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

alter_collection & sync_collection batch edits #1716

Merged

Conversation

sysmoon14
Copy link
Contributor

Description

Changed add_to_collection and sync_collection methods in builder.py to pass the parameters required for batchEdits to alter_collection in plex.py. plex.py has also been updated to implement the batchEdit functionality from PythonPlexAPI.

With the above changes I noticed dramatic improvements in the time taken to add 45 items to a movie collection which also had a custom sort. 19.1nightly27 took 4:07 seconds, versus 31 seconds using the code from this PR.

Note: PythonPlexAPI is currently broken for adding collections, and this PR will need to be released in order for my implementation to succeed.

Type of Change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

Checklist

  • My code was submitted to the nightly branch of the repository.

Moved alter_collections call and passed through items_added and items_removed so that batchEdits can be used in plex.py
Amended alter_collection to use batch edits for labels and collections
@sysmoon14 sysmoon14 changed the title Alter collection batch edits alter_collection & sync_collection batch edits Nov 7, 2023
@YozoraXCII
Copy link
Contributor

I have tested this locally (in combination with the Python-PlexAPI fix) and can confirm this functions as expected with no apparent negative impact.

@meisnate12 meisnate12 merged commit 8f964de into Kometa-Team:nightly Nov 8, 2023
@sysmoon14 sysmoon14 deleted the alter_collection-batchEdits branch November 15, 2023 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants