mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-06 05:01:14 -07:00
Update PlexAPI to 4.6.3
This commit is contained in:
parent
4ec8ef3ab3
commit
3fe77932a0
9 changed files with 265 additions and 70 deletions
|
@ -148,6 +148,7 @@ def searchType(libtype):
|
|||
Parameters:
|
||||
libtype (str): LibType to lookup (movie, show, season, episode, artist, album, track,
|
||||
collection)
|
||||
|
||||
Raises:
|
||||
:exc:`~plexapi.exceptions.NotFound`: Unknown libtype
|
||||
"""
|
||||
|
@ -159,6 +160,24 @@ def searchType(libtype):
|
|||
raise NotFound('Unknown libtype: %s' % libtype)
|
||||
|
||||
|
||||
def reverseSearchType(libtype):
|
||||
""" Returns the string value of the library type.
|
||||
|
||||
Parameters:
|
||||
libtype (int): Integer value of the library type.
|
||||
|
||||
Raises:
|
||||
:exc:`~plexapi.exceptions.NotFound`: Unknown libtype
|
||||
"""
|
||||
if libtype in SEARCHTYPES:
|
||||
return libtype
|
||||
libtype = int(libtype)
|
||||
for k, v in SEARCHTYPES.items():
|
||||
if libtype == v:
|
||||
return k
|
||||
raise NotFound('Unknown libtype: %s' % libtype)
|
||||
|
||||
|
||||
def threaded(callback, listargs):
|
||||
""" Returns the result of <callback> for each set of `*args` in listargs. Each call
|
||||
to <callback> is called concurrently in their own separate threads.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue