示例#1
0
        public void CreateFeedList(PodcastFeed podcastFeed)
        {
            var feedTab = new TabPage();

            tabCtrlFeeds.TabPages.Add(feedTab);

            var feedList = new ListBox();

            feedList.Dock = DockStyle.Fill;
            feedTab.Controls.Add(feedList);

            var rss  = WebFetcher.FetchRss(podcastFeed.Url);
            var feed = RssParser.GetPodcastFeed(rss);

            podcastFeed.PodcastEpisodes = feed.PodcastEpisodes;
            feedTab.Text = podcastFeed.Name;

            foreach (PodcastEpisode podcast in podcastFeed.PodcastEpisodes)
            {
                feedList.Items.Add(podcast.Name);
            }

            ActiveRss.Add(podcastFeed.Id, rss);
            TabPages.Add(podcastFeed.Id, feedTab);
            UpdateClocks.Add(podcastFeed.Id, new UpdateClock(podcastFeed));

            SetUpdateClocks();
            UpdateClocks[podcastFeed.Id].Start();
        }
示例#2
0
        //Returns true if a new version of the feed is found, otherwise false
        private bool CheckForUpdate(PodcastFeed podcastFeed)
        {
            var rss = WebFetcher.FetchRss(podcastFeed.Url);

            if (rss.Content == ActiveRss[podcastFeed.Id].Content)
            {
                return(false);
            }
            else
            {
                return(true);
            }
        }