mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-06 05:01:14 -07:00
Bump plexapi from 4.13.1 to 4.13.2 (#1939)
* Bump plexapi from 4.13.1 to 4.13.2 Bumps [plexapi](https://github.com/pkkid/python-plexapi) from 4.13.1 to 4.13.2. - [Release notes](https://github.com/pkkid/python-plexapi/releases) - [Commits](https://github.com/pkkid/python-plexapi/compare/4.13.1...4.13.2) --- updated-dependencies: - dependency-name: plexapi dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * Update plexapi==4.13.2 Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com> [skip ci]
This commit is contained in:
parent
8cd5b0b775
commit
31f6b02149
14 changed files with 250 additions and 107 deletions
|
@ -6,6 +6,7 @@ from xml.etree import ElementTree
|
|||
|
||||
from plexapi import log, utils
|
||||
from plexapi.exceptions import BadRequest, NotFound, UnknownType, Unsupported
|
||||
from plexapi.utils import cached_property
|
||||
|
||||
USER_DONT_RELOAD_FOR_KEYS = set()
|
||||
_DONT_RELOAD_FOR_KEYS = {'key'}
|
||||
|
@ -666,6 +667,13 @@ class PlexPartialObject(PlexObject):
|
|||
"""
|
||||
return self._getWebURL(base=base)
|
||||
|
||||
def playQueue(self, *args, **kwargs):
|
||||
""" Returns a new :class:`~plexapi.playqueue.PlayQueue` from this media item.
|
||||
See :func:`~plexapi.playqueue.PlayQueue.create` for available parameters.
|
||||
"""
|
||||
from plexapi.playqueue import PlayQueue
|
||||
return PlayQueue.create(self._server, self, *args, **kwargs)
|
||||
|
||||
|
||||
class Playable:
|
||||
""" This is a general place to store functions specific to media that is Playable.
|
||||
|
@ -841,7 +849,6 @@ class PlexSession(object):
|
|||
user = data.find('User')
|
||||
self._username = user.attrib.get('title')
|
||||
self._userId = utils.cast(int, user.attrib.get('id'))
|
||||
self._user = None # Cache for user object
|
||||
|
||||
# For backwards compatibility
|
||||
self.players = [self.player] if self.player else []
|
||||
|
@ -849,18 +856,16 @@ class PlexSession(object):
|
|||
self.transcodeSessions = [self.transcodeSession] if self.transcodeSession else []
|
||||
self.usernames = [self._username] if self._username else []
|
||||
|
||||
@property
|
||||
@cached_property
|
||||
def user(self):
|
||||
""" Returns the :class:`~plexapi.myplex.MyPlexAccount` object (for admin)
|
||||
or :class:`~plexapi.myplex.MyPlexUser` object (for users) for this session.
|
||||
"""
|
||||
if self._user is None:
|
||||
myPlexAccount = self._server.myPlexAccount()
|
||||
if self._userId == 1:
|
||||
self._user = myPlexAccount
|
||||
else:
|
||||
self._user = myPlexAccount.user(self._username)
|
||||
return self._user
|
||||
myPlexAccount = self._server.myPlexAccount()
|
||||
if self._userId == 1:
|
||||
return myPlexAccount
|
||||
|
||||
return myPlexAccount.user(self._username)
|
||||
|
||||
def reload(self):
|
||||
""" Reload the data for the session.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue