mirror of https://gitlab.com/bashrc2/epicyon
Update socialInteract url from podcast spec
parent
ea705c539b
commit
f052cabca5
|
@ -473,10 +473,17 @@ def _valid_podcast_entry(base_dir: str, key: str, entry: {}) -> bool:
|
|||
if key == 'socialInteract':
|
||||
if not entry.get('protocol'):
|
||||
return False
|
||||
if not entry.get('uri'):
|
||||
if not entry.get('text'):
|
||||
if not entry.get('url'):
|
||||
return False
|
||||
if entry['protocol'].tolower() != 'activitypub':
|
||||
return False
|
||||
if entry.get('uri'):
|
||||
post_url = entry['uri']
|
||||
elif entry.get('url'):
|
||||
post_url = entry['uri']
|
||||
else:
|
||||
post_url = entry['text']
|
||||
if '://' not in post_url:
|
||||
return False
|
||||
|
|
|
@ -30,9 +30,14 @@ def _html_podcast_social_interactions(podcast_properties: {},
|
|||
return ''
|
||||
if not podcast_properties.get('socialInteract'):
|
||||
return ''
|
||||
if not podcast_properties['socialInteract'].get('text'):
|
||||
return ''
|
||||
if podcast_properties['socialInteract'].get('uri'):
|
||||
episode_post_url = podcast_properties['socialInteract']['uri']
|
||||
elif podcast_properties['socialInteract'].get('url'):
|
||||
episode_post_url = podcast_properties['socialInteract']['url']
|
||||
elif podcast_properties['socialInteract'].get('text'):
|
||||
episode_post_url = podcast_properties['socialInteract']['text']
|
||||
else:
|
||||
return ''
|
||||
actor_str = ''
|
||||
podcast_account_id = None
|
||||
if podcast_properties['socialInteract'].get('accountId'):
|
||||
|
|
Loading…
Reference in New Issue