fix up for addLocations, only check paths that are being added not existing paths.

This commit is contained in:
blacktwin 2021-12-19 23:08:12 -05:00
parent 4c519c62dc
commit 9586d8f09d

View file

@ -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):