mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-14 01:02:59 -07:00
Filter season search by season index
This commit is contained in:
parent
c45a903f9f
commit
91446d01a7
3 changed files with 33 additions and 14 deletions
|
@ -1340,13 +1340,18 @@ class WebInterface(object):
|
|||
logger.warn('Unable to retrieve data.')
|
||||
|
||||
@cherrypy.expose
|
||||
def get_search_results_children(self, query, media_type=None, **kwargs):
|
||||
def get_search_results_children(self, query, media_type=None, season_index=None, **kwargs):
|
||||
|
||||
pms_connect = pmsconnect.PmsConnect()
|
||||
result = pms_connect.get_search_results(query)
|
||||
|
||||
if media_type:
|
||||
result['results_list'] = {media_type: result['results_list'][media_type]}
|
||||
if media_type == 'season' and season_index:
|
||||
for season in result['results_list']['season']:
|
||||
if season['index'] == season_index:
|
||||
result['results_list']['season'] = [season]
|
||||
break
|
||||
|
||||
if result:
|
||||
return serve_template(templatename="info_search_results_list.html", data=result, title="Search Result List")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue