mirror of
https://github.com/pkkid/python-plexapi
synced 2024-11-10 06:04:15 +00:00
Add support for Plex Playlists to server.py. Introduces the method PlexServer.playlists()
This commit is contained in:
parent
42364b09b9
commit
1299c1811f
1 changed files with 5 additions and 1 deletions
|
@ -4,7 +4,7 @@ PlexServer
|
|||
import requests
|
||||
from requests.status_codes import _codes as codes
|
||||
from plexapi import BASE_HEADERS, TIMEOUT
|
||||
from plexapi import log, video, audio
|
||||
from plexapi import log, video, audio, playlist
|
||||
from plexapi.client import Client
|
||||
from plexapi.exceptions import BadRequest, NotFound
|
||||
from plexapi.library import Library
|
||||
|
@ -120,3 +120,7 @@ class PlexServer(object):
|
|||
delim = '&' if '?' in path else '?'
|
||||
return '%s%s%sX-Plex-Token=%s' % (self.baseuri, path, delim, self.token)
|
||||
return '%s%s' % (self.baseuri, path)
|
||||
|
||||
def playlists(self, playlisttype=None):
|
||||
'Get playlists. `playlisttype` may be "audio", "video" or None (for both types)'
|
||||
return playlist.list_items(self, '/playlists')
|
||||
|
|
Loading…
Reference in a new issue