|
@@ -121,14 +121,15 @@ def get_or_create_podcast(post_data: dict) -> PodcastEpisode:
|
|
run_time_seconds = parsed_data.get("episode_runtime_seconds", post_data.get("run_time", 2700))
|
|
run_time_seconds = parsed_data.get("episode_runtime_seconds", post_data.get("run_time", 2700))
|
|
|
|
|
|
episode_dict = {
|
|
episode_dict = {
|
|
- "title": episode_name,
|
|
|
|
- "podcast_name": podcast_name,
|
|
|
|
- "podcast_description": parsed_data.get("podcast_description"),
|
|
|
|
- "pub_date": parsed_data.get("pub_date"),
|
|
|
|
- "number": parsed_data.get("episode_num"),
|
|
|
|
- "mopidy_uri": mopidy_uri,
|
|
|
|
- "producer_name": producer_name,
|
|
|
|
- "run_time_seconds": run_time_seconds,
|
|
|
|
}
|
|
}
|
|
|
|
|
|
- return PodcastEpisode.find_or_create(**episode_dict)
|
|
|
|
|
|
+ return PodcastEpisode.find_or_create(
|
|
|
|
+ title=episode_name,
|
|
|
|
+ podcast_name=podcast_name,
|
|
|
|
+ podcast_description=parsed_data.get("podcast_description", ""),
|
|
|
|
+ pub_date=parsed_data.get("pub_date", ""),
|
|
|
|
+ number=parsed_data.get("episode_num", 0),
|
|
|
|
+ mopidy_uri=mopidy_uri,
|
|
|
|
+ producer_name=producer_name,
|
|
|
|
+ run_time_seconds=run_time_seconds
|
|
|
|
+ )
|