* 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>
* 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>
* timeline() now returns ClientTimeline objects
* timeline() creates and returns ClientTimeline objects with associated attributes and caching
* Refactor isPlayingMedia to use the new attributes and fix it's default value
* Clarify docstrings
* Remove default param in timeline call & fix docstring typo
* return empty list if `timelines()` comes back empty
Web clients can occasionally return no timelines if no media has been played on them or if nothing has played for a while, this prevents errors in those cases.
* typo
* Workaround for unresponsive clients
* Use sendCommand rather than timelines() for PTP workaround
* Remove workaround, set timeline's wait default to 1
* set timelines() wait default to 0, document buggy behavior
* Use ClientTimeline.key for consistency
Co-authored-by: jjlawren <jjlawren@users.noreply.github.com>
* cast playQueue's IDs as int
Co-authored-by: jjlawren <jjlawren@users.noreply.github.com>
* Add audio attribs & make casts bool from int where it makes sense.
Co-authored-by: jjlawren <jjlawren@users.noreply.github.com>