mirror of
https://github.com/pkkid/python-plexapi
synced 2025-02-16 12:58:26 +00:00
Add path parameter to library update
This commit is contained in:
parent
6430f06e6b
commit
b9c3a93c67
1 changed files with 8 additions and 2 deletions
|
@ -578,9 +578,15 @@ class LibrarySection(PlexObject):
|
|||
key = '/library/sections/%s/emptyTrash' % self.key
|
||||
self._server.query(key, method=self._server._session.put)
|
||||
|
||||
def update(self):
|
||||
""" Scan this section for new media. """
|
||||
def update(self, path=None):
|
||||
""" Scan this section for new media.
|
||||
|
||||
Parameters:
|
||||
path (str, optional): Full path to folder to scan.
|
||||
"""
|
||||
key = '/library/sections/%s/refresh' % self.key
|
||||
if path is not None:
|
||||
key += '?path=%s' % quote_plus(path)
|
||||
self._server.query(key)
|
||||
|
||||
def cancelUpdate(self):
|
||||
|
|
Loading…
Add table
Reference in a new issue