Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add searchProviders parameter to searchDiscover method #1437

Merged
merged 3 commits into from
Jul 6, 2024

Conversation

mdinicola
Copy link
Contributor

I found the searchDiscover method is broken. Plex now requires a new parameter called searchProviders to be provided in the query. This parameter is a comma separated string with the following values:

  • discovery: This is the default behavior matching the previous functionality
  • PLEXAVOD: Plex ad-supported video service
  • PLEXTVOD: Plex transactional video service. I've also seen this referred to as Plex Rentals.

I've updated the searchDiscover method to default to just "discovery", with the option for users to include the other providers if they wish.

@JonnyWong16
Copy link
Collaborator

Please fix flake8 trailing whitespace.

""" Search for movies and TV shows in Discover.
Returns a list of :class:`~plexapi.video.Movie` and :class:`~plexapi.video.Show` objects.

Parameters:
query (str): Search query.
limit (int, optional): Limit to the specified number of results. Default 30.
libtype (str, optional): 'movie' or 'show' to only return movies or shows, otherwise return all items.
searchprovider (str, optional): 'discover' for default behavior
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
searchprovider (str, optional): 'discover' for default behavior
searchProviders (str, optional): 'discover' for default behavior

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe even just name the argument providers.

@glensc
Copy link
Contributor

glensc commented Jul 5, 2024

Blocks Taxel/PlexTraktSync#2002

@JonnyWong16 JonnyWong16 merged commit c7f4388 into pkkid:master Jul 6, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants