Skip to content

Commit 624af2e

Browse files
committed
remove use of Path objects for adding and removing locations
1 parent c19fa9f commit 624af2e

1 file changed

Lines changed: 2 additions & 10 deletions

File tree

plexapi/library.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -521,20 +521,16 @@ def addLocations(self, location):
521521
""" Add a location to a library.
522522
523523
Parameters:
524-
location (str, list, or :class:~plexapi.library.Path)): A single folder path, list of paths,
525-
or :class:`~plexapi.library.Path`.
524+
location (str or list): A single folder path, list of paths.
526525
527526
Example:
528527
529528
.. code-block:: python
530529
531530
LibrarySection.addLocations('/path/1')
532531
LibrarySection.addLocations(['/path/1', 'path/2', '/path/3'])
533-
LibrarySection.addLocations(PlexServer.browse()[0])
534532
"""
535533
locations = self.locations
536-
if isinstance(location, Path):
537-
location = location.path
538534
if isinstance(location, str):
539535
location = [location]
540536
for path in location:
@@ -547,19 +543,15 @@ def removeLocations(self, location):
547543
""" Remove a location from a library.
548544
549545
Parameters:
550-
location (str, list, or :class:~plexapi.library.Path): A single folder path, list of paths,
551-
or :class:`~plexapi.library.Path`.
546+
location (str or list): A single folder path, list of paths.
552547
Example:
553548
554549
.. code-block:: python
555550
556551
LibrarySection.removeLocations('/path/1')
557552
LibrarySection.removeLocations(['/path/1', 'path/2', '/path/3'])
558-
LibrarySection.removeLocations(PlexServer.browse()[0])
559553
"""
560554
locations = self.locations
561-
if isinstance(location, Path):
562-
location = location.path
563555
if isinstance(location, str):
564556
location = [location]
565557
for path in location:

0 commit comments

Comments
 (0)