Docker and more calendar work
This commit is contained in:
parent
4527504c80
commit
f7a919ebf2
22 changed files with 2036 additions and 79 deletions
|
@ -405,8 +405,8 @@ def add_by_url():
|
|||
return redirect(url_for('podcasts.view', podcast_id=existing.id))
|
||||
|
||||
try:
|
||||
# Try to get podcast episodes to validate the feed
|
||||
episodes = get_podcast_episodes(feed_url)
|
||||
# Try to get podcast episodes and metadata to validate the feed
|
||||
episodes, podcast_metadata = get_podcast_episodes(feed_url)
|
||||
|
||||
if not episodes:
|
||||
flash('No episodes found in the feed. Please check the URL and try again.', 'error')
|
||||
|
@ -415,9 +415,12 @@ def add_by_url():
|
|||
# Get the first episode to extract podcast info
|
||||
first_episode = episodes[0]
|
||||
|
||||
# Create podcast record with basic info
|
||||
# Create podcast record with info from feed
|
||||
podcast = Podcast(
|
||||
title=first_episode.get('podcast_title', 'Unknown Podcast'),
|
||||
title=podcast_metadata.get('title', first_episode.get('podcast_title', 'Unknown Podcast')),
|
||||
description=podcast_metadata.get('description', ''),
|
||||
author=podcast_metadata.get('author', ''),
|
||||
image_url=podcast_metadata.get('image_url', ''),
|
||||
feed_url=feed_url
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue