\n'
return podcast_str
def _html_podcast_performers(podcast_properties: {}) -> str:
"""Returns html for performers of a podcast
"""
if not podcast_properties:
return ''
if not podcast_properties.get('persons'):
return ''
# list of performers
podcast_str = '
\n'
podcast_str += '
\n'
podcast_str += '
\n'
for performer in podcast_properties['persons']:
if not performer.get('text'):
continue
performer_name = performer['text']
performer_title = performer_name
if performer.get('role'):
performer_title += ' (' + performer['role'] + ')'
if performer.get('group'):
performer_title += ', ' + performer['group'] + ''
performer_title = remove_html(performer_title)
performer_url = ''
if performer.get('href'):
performer_url = performer['href']
performer_img = ''
if performer.get('img'):
performer_img = performer['img']
podcast_str += '
\n'
podcast_str += ' \n'
podcast_str += '
\n'
podcast_str += '
\n'
podcast_str += '
\n'
return podcast_str
def _html_podcast_soundbites(link_url: str, extension: str,
podcast_properties: {},
translate: {}) -> str:
"""Returns html for podcast soundbites
"""
if not podcast_properties:
return ''
if not podcast_properties.get('soundbites'):
return ''
podcast_str = '
\n'
podcast_str += '
\n'
podcast_str += '
\n'
ctr = 1
for performer in podcast_properties['soundbites']:
if not performer.get('startTime'):
continue
if not performer['startTime'].isdigit():
continue
if not performer.get('duration'):
continue
if not performer['duration'].isdigit():
continue
end_time = str(float(performer['startTime']) +
float(performer['duration']))
podcast_str += '