mirror of https://gitlab.com/bashrc2/epicyon
Additional fields for podcast interaction
parent
5b7cc67720
commit
08e5f5ba8f
|
@ -514,7 +514,8 @@ def xml_podcast_to_dict(base_dir: str, xml_item: str, xml_str: str) -> {}:
|
||||||
'owner', 'srcset', 'img', 'role', 'address', 'suggested',
|
'owner', 'srcset', 'img', 'role', 'address', 'suggested',
|
||||||
'startTime', 'duration', 'href', 'name', 'pubdate',
|
'startTime', 'duration', 'href', 'name', 'pubdate',
|
||||||
'length', 'season', 'email', 'platform', 'protocol',
|
'length', 'season', 'email', 'platform', 'protocol',
|
||||||
'accountId', 'priority'
|
'accountId', 'priority', 'podcastAccountId',
|
||||||
|
'podcastAccountUrl'
|
||||||
)
|
)
|
||||||
pod_entry = {}
|
pod_entry = {}
|
||||||
for pod_field in pod_fields:
|
for pod_field in pod_fields:
|
||||||
|
|
|
@ -34,8 +34,14 @@ def _html_podcast_social_interactions(podcast_properties: {},
|
||||||
return ''
|
return ''
|
||||||
episode_post_url = podcast_properties['socialInteract']['text']
|
episode_post_url = podcast_properties['socialInteract']['text']
|
||||||
actor_str = ''
|
actor_str = ''
|
||||||
|
podcast_account_id = None
|
||||||
if podcast_properties['socialInteract'].get('accountId'):
|
if podcast_properties['socialInteract'].get('accountId'):
|
||||||
actor_handle = podcast_properties['socialInteract']['accountId']
|
podcast_account_id = podcast_properties['socialInteract']['accountId']
|
||||||
|
elif podcast_properties['socialInteract'].get('podcastAccountUrl'):
|
||||||
|
podcast_account_id = \
|
||||||
|
podcast_properties['socialInteract']['podcastAccountUrl']
|
||||||
|
if podcast_account_id:
|
||||||
|
actor_handle = podcast_account_id
|
||||||
if actor_handle.startswith('@'):
|
if actor_handle.startswith('@'):
|
||||||
actor_handle = actor_handle[1:]
|
actor_handle = actor_handle[1:]
|
||||||
actor_str = '?actor=' + actor_handle
|
actor_str = '?actor=' + actor_handle
|
||||||
|
|
Loading…
Reference in New Issue