Check if LibrarySection.search() filter is an OPERATOR

This commit is contained in:
JonnyWong16 2020-12-23 17:13:51 -08:00
parent 473b7aae65
commit 00f80cb424
No known key found for this signature in database
GPG key ID: B1F1F9807184697A

View file

@ -2,7 +2,7 @@
from urllib.parse import quote, quote_plus, unquote, urlencode
from plexapi import X_PLEX_CONTAINER_SIZE, log, utils
from plexapi.base import PlexObject, PlexPartialObject
from plexapi.base import OPERATORS, PlexObject, PlexPartialObject
from plexapi.exceptions import BadRequest, NotFound
from plexapi.media import MediaTag
from plexapi.settings import Setting
@ -670,11 +670,9 @@ class LibrarySection(PlexObject):
# cleanup the core arguments
args = {}
for category, value in list(kwargs.items()):
try:
if category.split('__')[-1] not in OPERATORS:
args[category] = self._cleanSearchFilter(category, value, libtype)
del kwargs[category]
except BadRequest:
continue
if title is not None:
args['title'] = title
if sort is not None: