mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-10 15:32:38 -07:00
Update to use Plex hub search
This commit is contained in:
parent
1b5e5f37d0
commit
1787fff8c3
3 changed files with 50 additions and 71 deletions
|
@ -3920,13 +3920,16 @@ class WebInterface(object):
|
|||
@cherrypy.tools.json_out()
|
||||
@requireAuth(member_of("admin"))
|
||||
@addtoapi('search')
|
||||
def search_results(self, query, **kwargs):
|
||||
def search_results(self, query='', limit='', **kwargs):
|
||||
""" Get search results from the PMS.
|
||||
|
||||
```
|
||||
Required parameters:
|
||||
query (str): The query string to search for
|
||||
|
||||
Optional parameters:
|
||||
limit (int): The maximum number of items to return per media type
|
||||
|
||||
Returns:
|
||||
json:
|
||||
{"results_count": 69,
|
||||
|
@ -3955,10 +3958,10 @@ class WebInterface(object):
|
|||
|
||||
@cherrypy.expose
|
||||
@requireAuth()
|
||||
def get_search_results_children(self, query, media_type=None, season_index=None, **kwargs):
|
||||
def get_search_results_children(self, query='', limit='', media_type=None, season_index=None, **kwargs):
|
||||
|
||||
pms_connect = pmsconnect.PmsConnect()
|
||||
result = pms_connect.get_search_results(query)
|
||||
result = pms_connect.get_search_results(query=query, limit=limit)
|
||||
|
||||
if media_type:
|
||||
result['results_list'] = {media_type: result['results_list'][media_type]}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue