Preserve youtube links

merge-requests/30/head
Bob Mottram 2021-03-18 18:37:55 +00:00
parent 5d7b24d724
commit 47a6d178e0
2 changed files with 4 additions and 2 deletions

View File

@ -542,8 +542,8 @@ def _desktopShowBoxJson(boxName: str, boxJson: {},
if not postJsonObject['object'].get('content'):
continue
published = postJsonObject['published'].replace('T', ' ')
posStr = str(ctr) + '.'
while len(posStr) < 3:
posStr = str(ctr)
while len(posStr) < 2:
posStr += ' '
authorActor = postJsonObject['object']['attributedTo']
name = getNicknameFromActor(authorActor)

View File

@ -168,8 +168,10 @@ def speakerReplaceLinks(sayText: str, translate: {},
Instead of reading out potentially very long and meaningless links
"""
text = sayText
text = text.replace('?v=', '__v=')
for ch in speakerRemoveChars:
text = text.replace(ch, ' ')
text = text.replace('__v=', '?v=')
replacements = {}
wordsList = text.split(' ')
if translate.get('Linked'):