mirror of https://gitlab.com/bashrc2/epicyon
Preserve youtube links
parent
5d7b24d724
commit
47a6d178e0
|
@ -542,8 +542,8 @@ def _desktopShowBoxJson(boxName: str, boxJson: {},
|
||||||
if not postJsonObject['object'].get('content'):
|
if not postJsonObject['object'].get('content'):
|
||||||
continue
|
continue
|
||||||
published = postJsonObject['published'].replace('T', ' ')
|
published = postJsonObject['published'].replace('T', ' ')
|
||||||
posStr = str(ctr) + '.'
|
posStr = str(ctr)
|
||||||
while len(posStr) < 3:
|
while len(posStr) < 2:
|
||||||
posStr += ' '
|
posStr += ' '
|
||||||
authorActor = postJsonObject['object']['attributedTo']
|
authorActor = postJsonObject['object']['attributedTo']
|
||||||
name = getNicknameFromActor(authorActor)
|
name = getNicknameFromActor(authorActor)
|
||||||
|
|
|
@ -168,8 +168,10 @@ def speakerReplaceLinks(sayText: str, translate: {},
|
||||||
Instead of reading out potentially very long and meaningless links
|
Instead of reading out potentially very long and meaningless links
|
||||||
"""
|
"""
|
||||||
text = sayText
|
text = sayText
|
||||||
|
text = text.replace('?v=', '__v=')
|
||||||
for ch in speakerRemoveChars:
|
for ch in speakerRemoveChars:
|
||||||
text = text.replace(ch, ' ')
|
text = text.replace(ch, ' ')
|
||||||
|
text = text.replace('__v=', '?v=')
|
||||||
replacements = {}
|
replacements = {}
|
||||||
wordsList = text.split(' ')
|
wordsList = text.split(' ')
|
||||||
if translate.get('Linked'):
|
if translate.get('Linked'):
|
||||||
|
|
Loading…
Reference in New Issue