Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/controllers/websocket_controller.rs
  • Loading branch information
SamTV12345 committed Dec 30, 2024
2 parents 9b4c624 + c027049 commit adb0b51
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/controllers/websocket_controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ pub async fn get_rss_feed(
None => PodcastEpisodeService::find_all_downloaded_podcast_episodes()?,
};

let downloaded_episodes: Vec<PodcastEpisodeDto> = downloaded_episodes.into_iter().map(|c|c
.into())
.collect();

let server_url = ENVIRONMENT_SERVICE.get_server_url();
let feed_url = add_api_key_to_url(format!("{}{}", &server_url, &"rss"), &api_key);

Expand Down Expand Up @@ -172,8 +176,9 @@ pub async fn get_rss_feed_for_podcast(

let podcast = Podcast::get_podcast(*id)?;

let downloaded_episodes =
PodcastEpisodeService::find_all_downloaded_podcast_episodes_by_podcast_id(*id)?;
let downloaded_episodes: Vec<PodcastEpisodeDto> =
PodcastEpisodeService::find_all_downloaded_podcast_episodes_by_podcast_id(*id)?.into_iter
().map(|c|c.into()).collect();

let mut itunes_owner = get_itunes_owner("", "");

Expand Down Expand Up @@ -212,7 +217,7 @@ pub async fn get_rss_feed_for_podcast(
.summary(podcast.summary.clone())
.build();

let items = get_podcast_items_rss(downloaded_episodes.clone(), &api_key);
let items = get_podcast_items_rss(&downloaded_episodes, &api_key);
let channel_builder = ChannelBuilder::default()
.language(podcast.clone().language)
.categories(categories)
Expand Down

0 comments on commit adb0b51

Please sign in to comment.