diff --git a/webapp_media.py b/webapp_media.py index 9d4d3e5db..73e74fbad 100644 --- a/webapp_media.py +++ b/webapp_media.py @@ -36,6 +36,20 @@ def _add_embedded_video_from_sites(translate: {}, content: str, width: int, height: int) -> str: """Adds embedded videos """ + if 'www.twitch.tv/' in content: + url = content.split('www.twitch.tv/')[1] + if '<' in url: + channel = url.split('<')[0] + if channel and '/' not in channel and ' ' not in channel: + content += \ + '
\n\n' + \ + '' + \ + '\n
\n' + return content + if '>vimeo.com/' in content: url = content.split('>vimeo.com/')[1] if '<' in url: