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
When searching for a series within a Library, if the series name has a comma, then the plexapi.library.LibrarySection.get() method returns the incorrect series.
This has happened for multiple series:
Love, Victor returns a match for Ainsley's Food We Love
Sabrina, The Teenage Witch returns Chilling Adventures of Sabrina
Alex, Inc. returns Alex Rider
If the comma is removed from the string, the correct match is returned. My guess is that the comma is causing the URL encoding to perhaps split the search into multiple queries (or something else entirely).
Code Snippets
fromplexapi.serverimportPlexServerPLEX_URL='YOUR URL HERE'PLEX_TOKEN='YOUR TOKEN HERE'LIBRARY_NAME='LIBRARY NAME HERE'server=PlexServer(PLEX_URL, PLEX_TOKEN)
library=server.library.section(LIBRARY_NAME)
# If Love, Victor and Ainsley's Food We Love are both presentprint(library.get('Love, Victor').guids)
# Prints [<Guid:imdb://tt13428252>, <Guid:tmdb://112847>, <Guid:tvdb://387981>]# which corresponds to the wrong showprint(library.get('Love Victor').guids)
# Prints [<Guid:imdb://tt10166602>, <Guid:tmdb://97186>, <Guid:tvdb://368188>]# which is correct
Expected Behavior
I expect the API to return the correct show. In particular the show titles within Plex include the commas, so searching with a comma should not be an issue.
Additional Context
No response
Operating System and Version
Windows 10 22H2
Plex Media Server Version
1.31.3.6819
Python Version
3.10.11
PlexAPI Version
4.13.4
The text was updated successfully, but these errors were encountered:
It seems to be a problem in Plex itself and not this Python library.
Go to the Advanced Filters in your library and try to do a filter for Title contains Love, Victor. Let me know if it works as expected. Also try Title is Love, Victor.
When I try it myself, Plex splits the filter into two filters Title contains Love and Title contains Victor.
Good catch - I see that as well. Perhaps this should be documented in the get method docs so that users can either manually remove the comma from their search or use the search method (and just filter the results manually)
Describe the Bug
When searching for a series within a Library, if the series name has a comma, then the
plexapi.library.LibrarySection.get()
method returns the incorrect series.This has happened for multiple series:
Love, Victor
returns a match forAinsley's Food We Love
Sabrina, The Teenage Witch
returnsChilling Adventures of Sabrina
Alex, Inc.
returnsAlex Rider
If the comma is removed from the string, the correct match is returned. My guess is that the comma is causing the URL encoding to perhaps split the search into multiple queries (or something else entirely).
Code Snippets
Expected Behavior
I expect the API to return the correct show. In particular the show titles within Plex include the commas, so searching with a comma should not be an issue.
Additional Context
No response
Operating System and Version
Windows 10 22H2
Plex Media Server Version
1.31.3.6819
Python Version
3.10.11
PlexAPI Version
4.13.4
The text was updated successfully, but these errors were encountered: