From e50c0c011ecb804210ad58100b99b26c7631c4b4 Mon Sep 17 00:00:00 2001 From: croneter Date: Sat, 9 Mar 2019 15:42:33 +0100 Subject: [PATCH] Allow searching the PMS --- resources/lib/entrypoint.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/resources/lib/entrypoint.py b/resources/lib/entrypoint.py index 4c6a31f5..229fa20c 100644 --- a/resources/lib/entrypoint.py +++ b/resources/lib/entrypoint.py @@ -404,9 +404,19 @@ def browse_plex(key=None, plex_type=None, section_id=None, synched=True, Pass synched=False if the items have NOT been synched to the Kodi DB """ - LOG.debug('Browsing to key %s, section %s, plex_type: %s, synched: %s', - key, section_id, plex_type, synched) + LOG.debug('Browsing to key %s, section %s, plex_type: %s, synched: %s, ' + 'prompt "%s"', key, section_id, plex_type, synched, prompt) app.init(entrypoint=True) + if prompt: + prompt = utils.dialog('input', prompt) + if prompt is None: + # User cancelled + return + prompt = prompt.strip().decode('utf-8') + if '?' not in key: + key = '%s?query=%s' % (key, prompt) + else: + key = '%s&query=%s' % (key, prompt) xml = DU().downloadUrl('{server}%s' % key) try: xml.attrib