Skip to content

Feature Request - Support Edit / Add of Multiple Locations for Library Sections #827

@EarthBoundX5

Description

@EarthBoundX5

Describe the issue

The current Python-PlexAPI does not appear to support edit() or add() of libraries with multiple folder locations. The vanilla Plex API supports this function. Please add functionality for feature parity.

Code snippets

Here is some general pseudo code that may be a way to implement this functionality.

if librarylocation.length > 1
x=librarylocation.length
while x != 0
locations = locations + "librarylocation[x]" + "&"
x--
trim locations "&"

Expected behavior

I would expect to be able to either pass in an array or string of values matching a defined syntax to Python-PlexAPI and it be passed to the Plex API request.

The current Plex API achieves this by simply having multiple location='s in the PUT request URL. For example:
location=C:\Users\Administrator\Desktop\TempPlex\Temp1&location=C:\Users\Administrator\Desktop\TempPlex\Temp2&location=C:\Users\Administrator\Desktop\TempPlex\Temp3

Enviroment (please complete the following information):

  • OS: Windows Server 2019
  • Plex version: 1.24.1.4931
  • Python Version: 3.7.9
  • PlexAPI version: 4.7.0

Additional context

I discovered this deficiency while posting in the Support Discord channel and received input and assistance from SwiftPanda. I think this could be a very useful supported function for Python-PlexAPI, I had planned to use it in tandem with automating library adds; but will be using PlexAPI direct now, so unless I have issues, there is no urgency from me on this request.

Additionally, worth noting there is a misspelling above in the GitHub issue template. Enviroment is spelled Environment.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions