diff options
| author | Ben Sima <ben@bsima.me> | 2025-09-04 10:29:04 -0400 |
|---|---|---|
| committer | Ben Sima (aider) <ben@bsima.me> | 2025-09-04 10:29:04 -0400 |
| commit | 576a85843dbd1834a8973aed6145ae0b9ddc1b2b (patch) | |
| tree | 4a5b0c76ea6ca7c12eac61a585113800afe79001 /Biz/PodcastItLater/Web.py | |
| parent | 34770d0fbf05a85826eb4b635c205dd7281fa660 (diff) | |
Add Episode Metadata: Author and Original URL
Enhance episode tracking by adding support for author and original
article URL. This allows users to see more context about each podcast
episode, improving the overall user experience and providing additional
information about the source material.
Diffstat (limited to 'Biz/PodcastItLater/Web.py')
| -rw-r--r-- | Biz/PodcastItLater/Web.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Biz/PodcastItLater/Web.py b/Biz/PodcastItLater/Web.py index 8586aaf..3493b7b 100644 --- a/Biz/PodcastItLater/Web.py +++ b/Biz/PodcastItLater/Web.py @@ -432,6 +432,13 @@ class EpisodeList(Component[AnyChildren, EpisodeListAttrs]): episode_items.append( html.div( html.h4(episode["title"]), + # Show author if available + html.p( + f"by {episode['author']}", + style={"margin": "5px 0", "font-style": "italic"}, + ) + if episode.get("author") + else html.span(), html.audio( html.source( src=episode["audio_url"], @@ -445,6 +452,18 @@ class EpisodeList(Component[AnyChildren, EpisodeListAttrs]): f"Duration: {duration_str} | " f"Created: {episode['created_at']}", ), + # Show link to original article if available + html.div( + html.a( + "View original article", + href=episode["original_url"], + target="_blank", + style={"color": "#007cba"}, + ), + style={"margin-top": "10px"}, + ) + if episode.get("original_url") + else html.span(), style={ "border": "1px solid #ddd", "padding": "15px", |
