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 key == 'socialInteract':
|
||||||
if not entry.get('protocol'):
|
if not entry.get('protocol'):
|
||||||
return False
|
return False
|
||||||
|
if not entry.get('uri'):
|
||||||
if not entry.get('text'):
|
if not entry.get('text'):
|
||||||
|
if not entry.get('url'):
|
||||||
return False
|
return False
|
||||||
if entry['protocol'].tolower() != 'activitypub':
|
if entry['protocol'].tolower() != 'activitypub':
|
||||||
return False
|
return False
|
||||||
|
if entry.get('uri'):
|
||||||
|
post_url = entry['uri']
|
||||||
|
elif entry.get('url'):
|
||||||
|
post_url = entry['uri']
|
||||||
|
else:
|
||||||
post_url = entry['text']
|
post_url = entry['text']
|
||||||
if '://' not in post_url:
|
if '://' not in post_url:
|
||||||
return False
|
return False
|
||||||
|
|
|
@ -30,9 +30,14 @@ def _html_podcast_social_interactions(podcast_properties: {},
|
||||||
return ''
|
return ''
|
||||||
if not podcast_properties.get('socialInteract'):
|
if not podcast_properties.get('socialInteract'):
|
||||||
return ''
|
return ''
|
||||||
if not podcast_properties['socialInteract'].get('text'):
|
if podcast_properties['socialInteract'].get('uri'):
|
||||||
return ''
|
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']
|
episode_post_url = podcast_properties['socialInteract']['text']
|
||||||
|
else:
|
||||||
|
return ''
|
||||||
actor_str = ''
|
actor_str = ''
|
||||||
podcast_account_id = None
|
podcast_account_id = None
|
||||||
if podcast_properties['socialInteract'].get('accountId'):
|
if podcast_properties['socialInteract'].get('accountId'):
|
||||||
|
|
Loading…
Reference in New Issue