* Replace datetime.utcfromtimestamp
* Update plexapi/utils.py
Co-authored-by: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com>
* Default using `fromtimestamp` and fallback to using `timedelta` from 0
---------
Co-authored-by: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com>
* Add property to return the Plex Media Server data metadata path
* Add property to return the filepath for a resource
* Add tests for metadataDirectory and resourceFilepath
* Refactor base fetchItems for pagination
* Use base fetchItems for LibrarySection methods
* Use base fetchItems for MyPlexAccount watchlist
* Use base fetchItems for PlexServer history
* Fix imports
* Properly close file object in mixin uploads
* Also support a file-like object as the upload `filepath` parameter
* Update image upload tests for file-like object
* Use @cached_property in PlexSession.user
* Use @cached_property in PlexServer.library
* Use @cached_property in PlexServer.settings
* Tests: Update clearing plex.settings cache
* Use @cached_property in LibrarySection.totalSize
* Add backports.cached-property==1.0.2; python_version<="3.7" dependency
* Import cached_property from dist or backports
* Add backports.cached-property to requirements_dev.txt
* Remove version pin for backports.cached-property in requirements.txt
Co-authored-by: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com>
Co-authored-by: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com>
* Add PlexObjects for all library media tags
* Add method to return all library media tags
* Add test for Library.tags
* Update Video.optimize
* Update video optimize test
* Use TAGTYPE for LibraryMediaTags
* Accept LibraryMediaTag as a search filter
* Use ratingKey and id before key in repr
* Add base findItem method
* Create new PlexSession objects
* PlexSession objects are unique from their base media objects. These objects are built from `/status/sessions` instead of `/library/metadata/<ratingKey>`. This allows reloading data from sessions without overwriting them.
* Add some media and client attributes for sessions
* Add separater property to return the PlexSession user object
* This speeds up building the `PlexSession` object since it doesn't need to lookup the user.
* The user object is also cached for future lookups.
* Remove PlexSession attributes from tests
* Never auto reload a PlexSession object
* Rename PlexSession.usernames for backwards compatibility
Co-authored-by: jjlawren <jjlawren@users.noreply.github.com>
* Don't cache myPlexAccount in PlexSession
* Move session stop method to PlexSession
Co-authored-by: jjlawren <jjlawren@users.noreply.github.com>
* Refactor tag functions into EditTagsMixin
* Fix test mixins tag use of _tagSingular
* Add kwargs to editTags
* Fix _tagSingular and _tagPlural if tag is already singular or plural
* Make editing tags chainable
* Add chaining example to doc string
* Update editTags doc string for batch editing
* Fix various typos
* Fix various typos in tests
* Fix typos in `tests`
* Fix more typos
* Fix hasScalingMatrix test
Co-authored-by: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com>
* moving common child (VideoStream, AudioStream, SubtitleStream) attributes to the parent (MediaPartStream)
* removal of no longer present attribs in video, audio, subtitle streams
* additional attribs to video and mediapart streams
* removal of previously unique subtitleStream attribs. attribs are now common or no longer present.
* docstring cleanup of video, audio, and subtitle stream; pass 1
* remove codecID checks as this attribute is now longer used.
* adding key attrib to parent MediaPartStream.
* add transient to SubtitleStream, found in uploaded subtitles
* removing dialogNorm related assertion as this attrib has been removed.
* update Media class based on PR comments
optimizedVersion to be added, need SEARCHTYPES
* update MediaPartStream class based on PR comments
* update VideoStream class based on PR comments
* update AudioStream class based on PR comments
* update SubtitleStream class based on PR comments
* add LyricStream class based on PR comments
* add streamType int and LyricStream to MediaPartStream.parse method
* add MediaPart.lyricStreams method
* spelling correction
* more movement based on PR comments
* alpha ordering MediaPart
* alpha sort VideoStream
* docstring corrections
* remove assert stream.dialogNorm from audio test as dialogNorm has been removed.
* adding LyricStream to _buildStreams function
* adding changes from @johnnywong16
e346f0b4dc
* moving unused imports down and together
* Address docstring review comments
* Change isChildOf for any kwargs
* Add Media.isOptimizedVersion property
* Add photo and track specific attributes
* Remove dead MediaPartStream.parse method
* Update media doc strings
* Add optimized version doc string
* Cast video stream codedHeight and codedWidth to int
* Add required bandwidths to streams
* Update video tests
* Update audio tests
* Fix video tests
* Fix video tests
* Fix video tests
Co-authored-by: Jason Lawrence <jjlawren@users.noreply.github.com>
Co-authored-by: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com>
* Make test Plex Pass entitlements a subset
* Fix create MyPlexDevice race condition
* Rename to clientId to be consistent
* Move link method to MyPlexAccount