Other Kodi add-ons can now search for Plex items using plugin://plugin.video.plexkodiconnect?mode=search&query=<your search string here>

This commit is contained in:
croneter 2020-02-02 14:09:10 +01:00
parent e55f16f61d
commit 25172c2f57
2 changed files with 8 additions and 4 deletions

View file

@ -50,7 +50,8 @@ class Main():
plex_type=params.get('plex_type'),
section_id=params.get('section_id'),
synched=params.get('synched') != 'false',
prompt=params.get('prompt'))
prompt=params.get('prompt'),
query=params.get('query'))
elif mode == 'show_section':
entrypoint.show_section(params.get('section_index'))
@ -66,7 +67,8 @@ class Main():
entrypoint.browse_plex(key='/hubs/search',
args={'includeCollections': 1,
'includeExternalMedia': 1},
prompt=utils.lang(137))
prompt=utils.lang(137),
query=params.get('query'))
elif mode == 'route_to_extras':
# Hack so we can store this path in the Kodi DB

View file

@ -468,7 +468,7 @@ def watchlater():
def browse_plex(key=None, plex_type=None, section_id=None, synched=True,
args=None, prompt=None):
args=None, prompt=None, query=None):
"""
Lists the content of a Plex folder, e.g. channels. Either pass in key (to
be used directly for PMS url {server}<key>) or the section_id
@ -483,7 +483,9 @@ def browse_plex(key=None, plex_type=None, section_id=None, synched=True,
return
app.init(entrypoint=True)
args = args or {}
if prompt:
if query:
args['query'] = query
elif prompt:
prompt = utils.dialog('input', prompt)
if prompt is None:
# User cancelled