From 8433d9069ede1b89dcb9af0dfb6e19d8e11d03d3 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 5 Jun 2024 18:43:17 +0100 Subject: [PATCH] Show fediverse handle, if available, on podcast screen --- webapp_podcast.py | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/webapp_podcast.py b/webapp_podcast.py index 79990ce40..212f0f758 100644 --- a/webapp_podcast.py +++ b/webapp_podcast.py @@ -12,6 +12,8 @@ import html import datetime import urllib.parse from shutil import copyfile +from utils import get_nickname_from_actor +from utils import get_domain_from_actor from utils import data_dir from utils import get_url_from_post from utils import get_config_param @@ -340,19 +342,19 @@ def html_podcast_episode(translate: {}, '
\n' podcast_str += '
\n' - podcast_str += '
\n' - podcast_str += '
\n' - podcast_str += '
\n' + podcast_str += ' \n' + podcast_str += '
\n' podcast_str += '
\n' podcast_str += '
\n' @@ -453,6 +455,15 @@ def html_podcast_episode(translate: {}, '" rel="donation">

\n' + fediverse_handle = '' + if len(newswire_item) > 9: + fediverse_handle = newswire_item[9] + podcast_nickname = get_nickname_from_actor(fediverse_handle) + podcast_domain, _ = get_domain_from_actor(fediverse_handle) + podcast_str += \ + '

' + \ + podcast_nickname + '@' + podcast_domain + '

\n' + if podcast_properties['categories']: tags_str = '' for tag in podcast_properties['categories']: