Describe the issue
The _include parameters when retrieving XML data from Plex should be configurable. It would allow the user to save resources and speed up the response by only retrieving the XML tags/fields that they need.
Example hardcoded _include parameters for ~plexapi.video.Movie:
https://github.com/pkkid/python-plexapi/blob/163d94d2492e976841f4d7b011cbdef1d849e53e/plexapi/video.py#L289-L291
This is especially useful for the checkFiles=1 parameter since this causes the Plex server to hit the storage to check if a file exists (~plexapi.media.MediaPart.exists) and is accessible (~plexapi.media.MediaPart.accessible) which may timeout if cloud storage is being used for the Plex server.
Code snipppets
Example of an unnecessary "heavy" reload.
fromplexapi.serverimportPlexServerplex=PlexServer('http://localhost:32400', token='xxxxxxxxxxxxxxxxxxxx')
formovieinplex.library.section("Movies").all():
# This will trigger an automatic reload() of every movie with checkFiles=1# even though the exists/accessible values are not neededprint(movie.subtitleStreams())Expected behavior
Example of a possible "lighter" reload.
fromplexapi.serverimportPlexServerplex=PlexServer('http://localhost:32400', token='xxxxxxxxxxxxxxxxxxxx')
formovieinplex.library.section("Movies").all():
# Manual reload() without checkFilesmovie.reload(checkFiles=False)
print(movie.subtitleStreams())Additional context
Some other XML includes that are available but not shown when viewing the XML through Plex.
includeFields=thumbBlurHash adds the thumbBlurHash field to the XML (used by Plexamp)includeFields=artBlurHash adds the artBlurHash field to the XML (used by Plexamp)
Reference: BlurHash.
Describe the issue
The
_includeparameters when retrieving XML data from Plex should be configurable. It would allow the user to save resources and speed up the response by only retrieving the XML tags/fields that they need.Example hardcoded
_includeparameters for~plexapi.video.Movie:https://github.com/pkkid/python-plexapi/blob/163d94d2492e976841f4d7b011cbdef1d849e53e/plexapi/video.py#L289-L291
This is especially useful for the
checkFiles=1parameter since this causes the Plex server to hit the storage to check if a file exists (~plexapi.media.MediaPart.exists) and is accessible (~plexapi.media.MediaPart.accessible) which may timeout if cloud storage is being used for the Plex server.Code snipppets
Example of an unnecessary "heavy" reload.
Expected behavior
Example of a possible "lighter" reload.
Additional context
Some other XML includes that are available but not shown when viewing the XML through Plex.
includeFields=thumbBlurHashadds thethumbBlurHashfield to the XML (used by Plexamp)includeFields=artBlurHashadds theartBlurHashfield to the XML (used by Plexamp)Reference: BlurHash.