Podcasts can potentially contain video

main
Bob Mottram 2022-01-13 11:11:18 +00:00
parent 05fa76dfdd
commit cc11b4141c
1 changed files with 14 additions and 0 deletions

View File

@ -184,6 +184,20 @@ def html_podcast_episode(css_cache: {}, translate: {},
audio_extension.replace('.', '') + '">' + \
translate['Your browser does not support the audio element.'] + \
'\n </audio>\n'
elif podcast_properties.get('linkMimeType'):
if 'video' in podcast_properties['linkMimeType']:
video_extension = \
podcast_properties['linkMimeType'].split('/')[1]
video_msg = 'Your browser does not support the video element.'
podcast_str += \
'<center><figure id="videoContainer" ' + \
'data-fullscreen="false">\n' + \
' <video id="video" controls ' + \
'preload="metadata">\n' + \
'<source src="' + link_url + '" type="video/' + \
video_extension.replace('.', '') + '">\n' + \
translate[video_msg] + \
'</video>\n</figure>\n</center>\n'
podcast_title = \
remove_html(html.unescape(urllib.parse.unquote_plus(newswire_item[0])))