public bool AddWatcher(string url) { if (watchers.ContainsKey(url)) { return(false); } TorrentRssWatcher watcher = new TorrentRssWatcher(url); feeds.Add(url); watcher.TorrentFound += OnTorrentMatched; watchers.Add(url, watcher); watcher.StartWatching(); return(true); }
public bool AddWatcher(string url) { if(watchers.ContainsKey(url)) return false; TorrentRssWatcher watcher = new TorrentRssWatcher(url); feeds.Add(url); watcher.TorrentFound += delegate(object o, TorrentRssWatcherEventArgs e) { GLib.Idle.Add(delegate { OnTorrentMatched(o, e); return false; }); }; watchers.Add(url, watcher); watcher.StartWatching(); return true; }