예제 #1
0
        public void OnTorrentFound(object sender, TorrentWatcherEventArgs args)
        {
            if (!prefSettings.ImportEnabled)
            {
                return;
            }

            logger.Info("New torrent detected, adding " + args.TorrentPath);
            addTorrent(args.TorrentPath, prefSettings.StartNewTorrents, true, prefSettings.RemoveOnImport, null);
        }
예제 #2
0
 void watcher_TorrentLost(object sender, TorrentWatcherEventArgs e)
 {
     //try
     //{
     //    TrackerEngine.Instance.Tracker.Remove(e.TorrentPath);
     //}
     //catch(Exception ex)
     //{
     //    Console.WriteLine("Couldn't remove torrent: {0}", e.TorrentPath);
     //    Console.WriteLine("Reason: {0}", ex.Message);
     //}
 }
예제 #3
0
 void watcher_TorrentFound(object sender, TorrentWatcherEventArgs e)
 {
     //try
     //{
     //    Torrent t = Torrent.Load(e.TorrentPath);
     //    TrackerEngine.Instance.Tracker.Add(t);
     //}
     //catch (Exception ex)
     //{
     //    Console.WriteLine("Couldn't load {0}.", e.TorrentPath);
     //    Console.WriteLine("Reason: {0}", ex.Message);
     //}
 }
예제 #4
0
		public void OnTorrentFound(object sender, TorrentWatcherEventArgs args)
		{
			if(!prefSettings.ImportEnabled)
				return;
				
			logger.Info("New torrent detected, adding " + args.TorrentPath);
			addTorrent(args.TorrentPath, prefSettings.StartNewTorrents, true, prefSettings.RemoveOnImport, null);
		}