Skip to content

Commit

Permalink
handle missing 'link' field in ep_metadata
Browse files Browse the repository at this point in the history
fix: #1
  • Loading branch information
yzqzss committed Jun 22, 2024
1 parent 1e8c2c7 commit dc7c5c2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions preserve_podcasts/uploadPodcasts.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,10 +271,10 @@ def upload_episode(podcast: Podcast, ep_audio_dir: Path, args: Args, session: Ar
"guid": ep_metadata['id'], # ep_guid, as same as LifePod-Beta
# ep_sha1ed_guid == sha1(ep_metadata['id'])
"guid_sha1": ep_sha1ed_guid, # so people won't get confused with the item identifier
"link": ep_metadata['link'],
"link": ep_metadata.get('link', ""),
"date": date,
"creator": [podcast.title, ep_metadata['author']], # podcast.author may contain author's Email address, DO NOT USE

"creator": [podcast.title]
+ ([ep_metadata['author']] if 'author' in ep_metadata else []), # podcast.author may contain author's Email address, DO NOT USE
"podcast_title": podcast.title,
"podcast_feedurl": podcast.feed_url,
"podcast_link": podcast.link,
Expand Down

0 comments on commit dc7c5c2

Please sign in to comment.