Update plexapi==4.15.15

This commit is contained in:
JonnyWong16 2024-07-06 11:02:21 -07:00
parent 2ee2ab652c
commit 96c5cb216c
No known key found for this signature in database
GPG key ID: B1F1F9807184697A
5 changed files with 13 additions and 5 deletions

View file

@ -866,6 +866,8 @@ class Playable:
if kwargs:
# So this seems to be a a lot slower but allows transcode.
kwargs['mediaIndex'] = self.media.index(part._parent())
kwargs['partIndex'] = part._parent().parts.index(part)
download_url = self.getStreamURL(**kwargs)
else:
download_url = self._server.url(f'{part.key}?download=1')

View file

@ -4,6 +4,6 @@
# Library version
MAJOR_VERSION = 4
MINOR_VERSION = 15
PATCH_VERSION = 13
PATCH_VERSION = 15
__short_version__ = f"{MAJOR_VERSION}.{MINOR_VERSION}"
__version__ = f"{__short_version__}.{PATCH_VERSION}"

View file

@ -478,6 +478,7 @@ class SubtitleStream(MediaPartStream):
return self.setSelected()
@utils.registerPlexObject
class LyricStream(MediaPartStream):
""" Represents a lyric stream within a :class:`~plexapi.media.MediaPart`.

View file

@ -1049,7 +1049,7 @@ class MyPlexAccount(PlexObject):
self.query(key, params=params)
return self
def searchDiscover(self, query, limit=30, libtype=None):
def searchDiscover(self, query, limit=30, libtype=None, providers='discover'):
""" Search for movies and TV shows in Discover.
Returns a list of :class:`~plexapi.video.Movie` and :class:`~plexapi.video.Show` objects.
@ -1057,6 +1057,9 @@ class MyPlexAccount(PlexObject):
query (str): Search query.
limit (int, optional): Limit to the specified number of results. Default 30.
libtype (str, optional): 'movie' or 'show' to only return movies or shows, otherwise return all items.
providers (str, optional): 'discover' for default behavior
or 'discover,PLEXAVOD' to also include the Plex ad-suported video service
or 'discover,PLEXAVOD,PLEXTVOD' to also include the Plex video rental service
"""
libtypes = {'movie': 'movies', 'show': 'tv'}
libtype = libtypes.get(libtype, 'movies,tv')
@ -1068,6 +1071,7 @@ class MyPlexAccount(PlexObject):
'query': query,
'limit': limit,
'searchTypes': libtype,
'searchProviders': providers,
'includeMetadata': 1
}

View file

@ -413,16 +413,17 @@ class PlexServer(PlexObject):
return items
def client(self, name):
""" Returns the :class:`~plexapi.client.PlexClient` that matches the specified name.
""" Returns the :class:`~plexapi.client.PlexClient` that matches the specified name
or machine identifier.
Parameters:
name (str): Name of the client to return.
name (str): Name or machine identifier of the client to return.
Raises:
:exc:`~plexapi.exceptions.NotFound`: Unknown client name.
"""
for client in self.clients():
if client and client.title == name:
if client and (client.title == name or client.machineIdentifier == name):
return client
raise NotFound(f'Unknown client name: {name}')