Merge pull request #1108 from croneter/search
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:
commit
31323665e4
2 changed files with 8 additions and 4 deletions
|
@ -50,7 +50,8 @@ class Main():
|
||||||
plex_type=params.get('plex_type'),
|
plex_type=params.get('plex_type'),
|
||||||
section_id=params.get('section_id'),
|
section_id=params.get('section_id'),
|
||||||
synched=params.get('synched') != 'false',
|
synched=params.get('synched') != 'false',
|
||||||
prompt=params.get('prompt'))
|
prompt=params.get('prompt'),
|
||||||
|
query=params.get('query'))
|
||||||
|
|
||||||
elif mode == 'show_section':
|
elif mode == 'show_section':
|
||||||
entrypoint.show_section(params.get('section_index'))
|
entrypoint.show_section(params.get('section_index'))
|
||||||
|
@ -66,7 +67,8 @@ class Main():
|
||||||
entrypoint.browse_plex(key='/hubs/search',
|
entrypoint.browse_plex(key='/hubs/search',
|
||||||
args={'includeCollections': 1,
|
args={'includeCollections': 1,
|
||||||
'includeExternalMedia': 1},
|
'includeExternalMedia': 1},
|
||||||
prompt=utils.lang(137))
|
prompt=utils.lang(137),
|
||||||
|
query=params.get('query'))
|
||||||
|
|
||||||
elif mode == 'route_to_extras':
|
elif mode == 'route_to_extras':
|
||||||
# Hack so we can store this path in the Kodi DB
|
# Hack so we can store this path in the Kodi DB
|
||||||
|
|
|
@ -468,7 +468,7 @@ def watchlater():
|
||||||
|
|
||||||
|
|
||||||
def browse_plex(key=None, plex_type=None, section_id=None, synched=True,
|
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
|
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
|
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
|
return
|
||||||
app.init(entrypoint=True)
|
app.init(entrypoint=True)
|
||||||
args = args or {}
|
args = args or {}
|
||||||
if prompt:
|
if query:
|
||||||
|
args['query'] = query
|
||||||
|
elif prompt:
|
||||||
prompt = utils.dialog('input', prompt)
|
prompt = utils.dialog('input', prompt)
|
||||||
if prompt is None:
|
if prompt is None:
|
||||||
# User cancelled
|
# User cancelled
|
||||||
|
|
Loading…
Reference in a new issue