Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Some of the default
PlexPartialObject
include parameters are unnecessary. The additional data is requested from the Plex server but just gets discarded or unused. For example:includeExtras=1
adds extras to the metadata, but extras are fetched on-demand using theExtrasMixin.extras()
method.includeRelated=1
adds related media hubs to the metadata, but the related hubs are fetched on-demand using theHubsMixin.hubs()
method.This change disables all the unused include parameters where an alternative on-demand method exists. This improves reloading (and auto-reloading) performance significantly.
Because not all the include parameters are included by default,
isFullObject()
now checks if the key path matches the init path as well as if the key query string is a subset of the init query string. This allows adding extra reload parameters in addition to the default parameters also a full object.Breaking Change
The
checkFiles
parameter default is changed to0
(disabled). This prevents the Plex server from scanning the files to check if they exist and are accessible which can have a significant impact on API response time. This only affects theMediaPart.exists
andMediaPart.accessible
attributes. A manual reload usingreload(checkFiles=True)
is now required to access these two attributes.Ref.: #1449
Type of change
Please delete options that are not relevant.
Checklist: