mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-08 06:00:51 -07:00
Add kwargs to plexapi playlists fetchItems
This commit is contained in:
parent
ca69293d8b
commit
e27efb3946
2 changed files with 6 additions and 6 deletions
|
@ -772,7 +772,7 @@ class MovieSection(LibrarySection):
|
||||||
def playlist(self, **kwargs):
|
def playlist(self, **kwargs):
|
||||||
""" Returns a list of playlists from this library section. """
|
""" Returns a list of playlists from this library section. """
|
||||||
key = '/playlists?type=15&playlistType=%s§ionID=%s' % (self.CONTENT_TYPE, self.key)
|
key = '/playlists?type=15&playlistType=%s§ionID=%s' % (self.CONTENT_TYPE, self.key)
|
||||||
return self.fetchItems(key)
|
return self.fetchItems(key, **kwargs)
|
||||||
|
|
||||||
def sync(self, videoQuality, limit=None, unwatched=False, **kwargs):
|
def sync(self, videoQuality, limit=None, unwatched=False, **kwargs):
|
||||||
""" Add current Movie library section as sync item for specified device.
|
""" Add current Movie library section as sync item for specified device.
|
||||||
|
@ -857,7 +857,7 @@ class ShowSection(LibrarySection):
|
||||||
def playlist(self, **kwargs):
|
def playlist(self, **kwargs):
|
||||||
""" Returns a list of playlists from this library section. """
|
""" Returns a list of playlists from this library section. """
|
||||||
key = '/playlists?type=15&playlistType=%s§ionID=%s' % (self.CONTENT_TYPE, self.key)
|
key = '/playlists?type=15&playlistType=%s§ionID=%s' % (self.CONTENT_TYPE, self.key)
|
||||||
return self.fetchItems(key)
|
return self.fetchItems(key, **kwargs)
|
||||||
|
|
||||||
def sync(self, videoQuality, limit=None, unwatched=False, **kwargs):
|
def sync(self, videoQuality, limit=None, unwatched=False, **kwargs):
|
||||||
""" Add current Show library section as sync item for specified device.
|
""" Add current Show library section as sync item for specified device.
|
||||||
|
@ -943,7 +943,7 @@ class MusicSection(LibrarySection):
|
||||||
def playlist(self, **kwargs):
|
def playlist(self, **kwargs):
|
||||||
""" Returns a list of playlists from this library section. """
|
""" Returns a list of playlists from this library section. """
|
||||||
key = '/playlists?type=15&playlistType=%s§ionID=%s' % (self.CONTENT_TYPE, self.key)
|
key = '/playlists?type=15&playlistType=%s§ionID=%s' % (self.CONTENT_TYPE, self.key)
|
||||||
return self.fetchItems(key)
|
return self.fetchItems(key, **kwargs)
|
||||||
|
|
||||||
def sync(self, bitrate, limit=None, **kwargs):
|
def sync(self, bitrate, limit=None, **kwargs):
|
||||||
""" Add current Music library section as sync item for specified device.
|
""" Add current Music library section as sync item for specified device.
|
||||||
|
@ -1009,7 +1009,7 @@ class PhotoSection(LibrarySection):
|
||||||
def playlist(self, **kwargs):
|
def playlist(self, **kwargs):
|
||||||
""" Returns a list of playlists from this library section. """
|
""" Returns a list of playlists from this library section. """
|
||||||
key = '/playlists?type=15&playlistType=%s§ionID=%s' % (self.CONTENT_TYPE, self.key)
|
key = '/playlists?type=15&playlistType=%s§ionID=%s' % (self.CONTENT_TYPE, self.key)
|
||||||
return self.fetchItems(key)
|
return self.fetchItems(key, **kwargs)
|
||||||
|
|
||||||
def sync(self, resolution, limit=None, **kwargs):
|
def sync(self, resolution, limit=None, **kwargs):
|
||||||
""" Add current Music library section as sync item for specified device.
|
""" Add current Music library section as sync item for specified device.
|
||||||
|
|
|
@ -366,11 +366,11 @@ class PlexServer(PlexObject):
|
||||||
args['X-Plex-Container-Start'] += args['X-Plex-Container-Size']
|
args['X-Plex-Container-Start'] += args['X-Plex-Container-Size']
|
||||||
return results
|
return results
|
||||||
|
|
||||||
def playlists(self):
|
def playlists(self, **kwargs):
|
||||||
""" Returns a list of all :class:`~plexapi.playlist.Playlist` objects saved on the server. """
|
""" Returns a list of all :class:`~plexapi.playlist.Playlist` objects saved on the server. """
|
||||||
# TODO: Add sort and type options?
|
# TODO: Add sort and type options?
|
||||||
# /playlists/all?type=15&sort=titleSort%3Aasc&playlistType=video&smart=0
|
# /playlists/all?type=15&sort=titleSort%3Aasc&playlistType=video&smart=0
|
||||||
return self.fetchItems('/playlists')
|
return self.fetchItems('/playlists', **kwargs)
|
||||||
|
|
||||||
def playlist(self, title):
|
def playlist(self, title):
|
||||||
""" Returns the :class:`~plexapi.client.Playlist` that matches the specified title.
|
""" Returns the :class:`~plexapi.client.Playlist` that matches the specified title.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue