mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-06 05:01:14 -07:00
Bump plexapi from 4.9.2 to 4.11.0 (#1690)
* Bump plexapi from 4.9.2 to 4.10.1 Bumps [plexapi](https://github.com/pkkid/python-plexapi) from 4.9.2 to 4.10.1. - [Release notes](https://github.com/pkkid/python-plexapi/releases) - [Commits](https://github.com/pkkid/python-plexapi/compare/4.9.2...4.10.1) --- updated-dependencies: - dependency-name: plexapi dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * Update plexapi==4.11.0 * Update requirements.txt 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
f1b95f5837
commit
399fd6ff91
22 changed files with 1421 additions and 589 deletions
|
@ -23,10 +23,10 @@ class PlexClient(PlexObject):
|
|||
server (:class:`~plexapi.server.PlexServer`): PlexServer this client is connected to (optional).
|
||||
data (ElementTree): Response from PlexServer used to build this object (optional).
|
||||
initpath (str): Path used to generate data.
|
||||
baseurl (str): HTTP URL to connect dirrectly to this client.
|
||||
baseurl (str): HTTP URL to connect directly to this client.
|
||||
identifier (str): The resource/machine identifier for the desired client.
|
||||
May be necessary when connecting to a specific proxied client (optional).
|
||||
token (str): X-Plex-Token used for authenication (optional).
|
||||
token (str): X-Plex-Token used for authentication (optional).
|
||||
session (:class:`~requests.Session`): requests.Session object if you want more control (optional).
|
||||
timeout (int): timeout in seconds on initial connect to client (default config.TIMEOUT).
|
||||
|
||||
|
@ -48,7 +48,7 @@ class PlexClient(PlexObject):
|
|||
session (:class:`~requests.Session`): Session object used for connection.
|
||||
state (str): Unknown
|
||||
title (str): Name of this client (Johns iPhone, etc).
|
||||
token (str): X-Plex-Token used for authenication
|
||||
token (str): X-Plex-Token used for authentication
|
||||
vendor (str): Unknown
|
||||
version (str): Device version (4.6.1, etc).
|
||||
_baseurl (str): HTTP address of the client.
|
||||
|
@ -131,7 +131,7 @@ class PlexClient(PlexObject):
|
|||
self.platformVersion = data.attrib.get('platformVersion')
|
||||
self.title = data.attrib.get('title') or data.attrib.get('name')
|
||||
# Active session details
|
||||
# Since protocolCapabilities is missing from /sessions we cant really control this player without
|
||||
# Since protocolCapabilities is missing from /sessions we can't really control this player without
|
||||
# creating a client manually.
|
||||
# Add this in next breaking release.
|
||||
# if self._initpath == 'status/sessions':
|
||||
|
@ -210,8 +210,8 @@ class PlexClient(PlexObject):
|
|||
controller = command.split('/')[0]
|
||||
headers = {'X-Plex-Target-Client-Identifier': self.machineIdentifier}
|
||||
if controller not in self.protocolCapabilities:
|
||||
log.debug('Client %s doesnt support %s controller.'
|
||||
'What your trying might not work' % (self.title, controller))
|
||||
log.debug("Client %s doesn't support %s controller."
|
||||
"What your trying might not work" % (self.title, controller))
|
||||
|
||||
proxy = self._proxyThroughServer if proxy is None else proxy
|
||||
query = self._server.query if proxy else self.query
|
||||
|
@ -318,21 +318,21 @@ class PlexClient(PlexObject):
|
|||
Parameters:
|
||||
media (:class:`~plexapi.media.Media`): Media object to navigate to.
|
||||
**params (dict): Additional GET parameters to include with the command.
|
||||
|
||||
Raises:
|
||||
:exc:`~plexapi.exceptions.Unsupported`: When no PlexServer specified in this object.
|
||||
"""
|
||||
if not self._server:
|
||||
raise Unsupported('A server must be specified before using this command.')
|
||||
server_url = media._server._baseurl.split(':')
|
||||
self.sendCommand('mirror/details', **dict({
|
||||
'machineIdentifier': self._server.machineIdentifier,
|
||||
command = {
|
||||
'machineIdentifier': media._server.machineIdentifier,
|
||||
'address': server_url[1].strip('/'),
|
||||
'port': server_url[-1],
|
||||
'key': media.key,
|
||||
'protocol': server_url[0],
|
||||
'token': media._server.createToken()
|
||||
}, **params))
|
||||
**params,
|
||||
}
|
||||
token = media._server.createToken()
|
||||
if token:
|
||||
command["token"] = token
|
||||
|
||||
self.sendCommand("mirror/details", **command)
|
||||
|
||||
# -------------------
|
||||
# Playback Commands
|
||||
|
@ -488,12 +488,7 @@ class PlexClient(PlexObject):
|
|||
representing the beginning (default 0).
|
||||
**params (dict): Optional additional parameters to include in the playback request. See
|
||||
also: https://github.com/plexinc/plex-media-player/wiki/Remote-control-API#modified-commands
|
||||
|
||||
Raises:
|
||||
:exc:`~plexapi.exceptions.Unsupported`: When no PlexServer specified in this object.
|
||||
"""
|
||||
if not self._server:
|
||||
raise Unsupported('A server must be specified before using this command.')
|
||||
server_url = media._server._baseurl.split(':')
|
||||
server_port = server_url[-1].strip('/')
|
||||
|
||||
|
@ -509,19 +504,24 @@ class PlexClient(PlexObject):
|
|||
if mediatype == "audio":
|
||||
mediatype = "music"
|
||||
|
||||
playqueue = media if isinstance(media, PlayQueue) else self._server.createPlayQueue(media)
|
||||
self.sendCommand('playback/playMedia', **dict({
|
||||
playqueue = media if isinstance(media, PlayQueue) else media._server.createPlayQueue(media)
|
||||
command = {
|
||||
'providerIdentifier': 'com.plexapp.plugins.library',
|
||||
'machineIdentifier': self._server.machineIdentifier,
|
||||
'machineIdentifier': media._server.machineIdentifier,
|
||||
'protocol': server_url[0],
|
||||
'address': server_url[1].strip('/'),
|
||||
'port': server_port,
|
||||
'offset': offset,
|
||||
'key': media.key or playqueue.selectedItem.key,
|
||||
'token': media._server.createToken(),
|
||||
'type': mediatype,
|
||||
'containerKey': '/playQueues/%s?window=100&own=1' % playqueue.playQueueID,
|
||||
}, **params))
|
||||
**params,
|
||||
}
|
||||
token = media._server.createToken()
|
||||
if token:
|
||||
command["token"] = token
|
||||
|
||||
self.sendCommand("playback/playMedia", **command)
|
||||
|
||||
def setParameters(self, volume=None, shuffle=None, repeat=None, mtype=DEFAULT_MTYPE):
|
||||
""" Set multiple playback parameters at once.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue