public async Task UpdatePodcast(string URL, string name, int interval, Category category, int index) { await Task.Run(() => { var episodesList = podcastRepository.reader.GetEpisodes(URL); int episodeAmount = podcastRepository.reader.GetAmountOfEpisodes(URL); podcastRepository.Update(URL, name, interval, category, index, episodesList.Result, episodeAmount); }); }
public void UpdateAllPodcastInfo(int selectedPodcast, string url, string name, string interval, string category) { try { var podcastList = podcastRepository.GetAll(); Podcast podcast = podcastList[selectedPodcast]; podcast.Url = url; podcast.Name = name; podcast.Interval = Convert.ToInt32(interval); podcast.Category = category; podcastRepository.Update(selectedPodcast, podcast); } catch (ArgumentOutOfRangeException) { MessageBox.Show("Must select a podcast to update."); } }