Opening links

merge-requests/21/head
Bob Mottram 2021-03-15 17:05:02 +00:00
parent 7744629257
commit 4ffe42e55b
1 changed files with 3 additions and 1 deletions

View File

@ -1155,13 +1155,15 @@ def runNotificationsClient(baseDir: str, proxyType: str, httpPrefix: str,
elif keyPress.startswith('open'): elif keyPress.startswith('open'):
currIndex = 0 currIndex = 0
if ' ' in keyPress: if ' ' in keyPress:
postIndex = keyPress.split(' ')[1].strip() postIndex = keyPress.split(' ')[-1].strip()
if postIndex.isdigit(): if postIndex.isdigit():
currIndex = int(postIndex) currIndex = int(postIndex)
print('currIndex: ' + str(currIndex) + ' ' + currTimeline)
speakerJson = \ speakerJson = \
_getSpeakerJsonFromIndex(currTimeline, currIndex) _getSpeakerJsonFromIndex(currTimeline, currIndex)
if not speakerJson: if not speakerJson:
speakerJson = {} speakerJson = {}
print('speakerJson: ' + str(speakerJson))
linkOpened = False linkOpened = False
if speakerJson.get('detectedLinks'): if speakerJson.get('detectedLinks'):
if len(speakerJson['detectedLinks']) > 0: if len(speakerJson['detectedLinks']) > 0: