You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A global Plex server search (hub search) doesn't provide guids in the response. This is equivalent to typing into the search box in Plex Web and displaying the results in the dropdown list. So to get the guids, PlexAPI has to make a second API call to .reload() the object (equivalent to clicking on one of the results in the dropdown list).
You should search in a specific library instead. This is equivalent to using the "Advanced Filters" in a library. This API response includes the guids so no additional API calls are required.
Ok I see. In my case, I need a hub search so I was thinking querying guids only when needed by providing a unique identifier to the library section like so plex_instance.library.sectionByID(int(sectionID)).getGuid(guid) (guid can be retrived from hub search apparently). The drawback is that it will not work for agents like hama... Is there another unique identifier (except guid) that allows me to return a specific media in plex ?
EDIT: Ok I think this will be my workaround -> [plex_instance.library.sectionByID(int(_sectionID)).fetchItem(_key).guids]. Passing the key seems to work better 😄
Activity
JonnyWong16 commentedon Mar 16, 2023
This is expected.
A global Plex server search (hub search) doesn't provide
guidsin the response. This is equivalent to typing into the search box in Plex Web and displaying the results in the dropdown list. So to get the guids, PlexAPI has to make a second API call to.reload()the object (equivalent to clicking on one of the results in the dropdown list).You should search in a specific library instead. This is equivalent to using the "Advanced Filters" in a library. This API response includes the
guidsso no additional API calls are required.BenjaminOddou commentedon Mar 16, 2023
Ok I see. In my case, I need a hub search so I was thinking querying
guidsonly when needed by providing a unique identifier to the library section like soplex_instance.library.sectionByID(int(sectionID)).getGuid(guid)(guid can be retrived from hub search apparently). The drawback is that it will not work for agents likehama... Is there another unique identifier (except guid) that allows me to return a specific media in plex ?EDIT: Ok I think this will be my workaround ->
[plex_instance.library.sectionByID(int(_sectionID)).fetchItem(_key).guids]. Passing the key seems to work better 😄