mirror of
https://github.com/pkkid/python-plexapi
synced 2025-02-16 12:58:26 +00:00
fix up for addLocations, only check paths that are being added not existing paths.
This commit is contained in:
parent
4c519c62dc
commit
9586d8f09d
1 changed files with 4 additions and 5 deletions
|
@ -539,13 +539,12 @@ class LibrarySection(PlexObject):
|
|||
locations = self.locations
|
||||
if isinstance(location, Path):
|
||||
location = location.path
|
||||
if isinstance(location, list):
|
||||
locations.extend(location)
|
||||
else:
|
||||
locations.append(location)
|
||||
for path in locations:
|
||||
if isinstance(location, str):
|
||||
location = [location]
|
||||
for path in location:
|
||||
if not self._server.isBrowsable(path):
|
||||
raise BadRequest('Path: %s does not exist.' % path)
|
||||
locations.append(path)
|
||||
self.edit(location=locations)
|
||||
|
||||
def removeLocations(self, location):
|
||||
|
|
Loading…
Add table
Reference in a new issue