private void FetchFeeds(object sender, DoWorkEventArgs args)
        {
            controller.Items.Clear();

            foreach (string feed in controller.Feeds)
            {
                RssReader rssReader = new RssReader(feed);

                foreach (RssItem item in rssReader.Items)
                {
                    controller.Items.Add(item);
                }
            }
        }
Beispiel #2
0
        private void OnTimedEvent(object source, ElapsedEventArgs e)
        {
            RssReader rssReader = new RssReader(uri);

            Console.Out.WriteLine("Ding!");
            foreach (RssItem item in rssReader.Items)
            {
                //Console.Out.WriteLine("Item: " + item.Title);
                lock (filters) {
                    foreach (RssFilter filter in filters)
                    {
                        Console.Out.WriteLine("Filter: " + filter.Include + " Item: " + item.Title);
                        if (uri != filter.Feed && filter.Feed != "All")
                        {
                            continue;
                        }

                        if (filter.Include == string.Empty)
                        {
                            continue;
                        }

                        Match m = Regex.Match(item.Title, filter.Include);
                        if (!m.Success)
                        {
                            continue;
                        }

                        if (filter.Exclude != string.Empty)
                        {
                            Match n = Regex.Match(item.Title, filter.Exclude);
                            if (n.Success)
                            {
                                continue;
                            }
                        }

                        RaiseTorrentFound(filter, item);
                    }
                }
            }
        }
		private void FetchFeeds(object sender, DoWorkEventArgs args)
		{
			controller.Items.Clear();
			
			foreach(string feed in controller.Feeds){
				RssReader rssReader = new RssReader(feed);
				
				foreach(RssItem item in rssReader.Items){
					controller.Items.Add(item);
				}
			}
		}
		private void OnTimedEvent(object source, ElapsedEventArgs e)
		{
			RssReader rssReader = new RssReader(uri);
			Console.Out.WriteLine("Ding!");
			foreach(RssItem item in rssReader.Items){
				//Console.Out.WriteLine("Item: " + item.Title);
				lock(filters) {
					foreach(RssFilter filter in filters){					
						Console.Out.WriteLine("Filter: " + filter.Include + " Item: " + item.Title);
						if(uri != filter.Feed && filter.Feed != "All"){
							continue;
						}
						
						if(filter.Include == string.Empty){
							continue;
						}
						
						Match m = Regex.Match(item.Title, filter.Include);
						if(!m.Success)
							continue;
						
						if(filter.Exclude != string.Empty){
							Match n = Regex.Match(item.Title, filter.Exclude);
							if(n.Success)
								continue;
						}
						
						RaiseTorrentFound(filter, item);
					}
				}
			}
		}