コード例 #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
ファイル: TrackerApp.cs プロジェクト: wangscript007/hurricane
 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
ファイル: TrackerApp.cs プロジェクト: wangscript007/hurricane
 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);
		}