Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion plexapi/myplex.py
Original file line number Diff line number Diff line change
Expand Up @@ -1049,14 +1049,17 @@ def markUnplayed(self, item):
self.query(key, params=params)
return self

def searchDiscover(self, query, limit=30, libtype=None):
def searchDiscover(self, query, limit=30, libtype=None, providers='discover'):
""" 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.
providers (str, optional): 'discover' for default behavior
or 'discover,PLEXAVOD' to also include the Plex ad-suported video service
or 'discover,PLEXAVOD,PLEXTVOD' to also include the Plex video rental service
"""
libtypes = {'movie': 'movies', 'show': 'tv'}
libtype = libtypes.get(libtype, 'movies,tv')
Expand All @@ -1068,6 +1071,7 @@ def searchDiscover(self, query, limit=30, libtype=None):
'query': query,
'limit': limit,
'searchTypes': libtype,
'searchProviders': providers,
'includeMetadata': 1
}

Expand Down