Exemple #1
0
 public PostingThread(Settings configuration, WatchFolderSettings folderConfiguration, NewsHostConnectionInfo connectionInfo, 
     Queue<nntpMessage> messageQueue)
 {
     _configuration = configuration;
     _folderConfiguration = folderConfiguration;
     _connectionInfo = connectionInfo;
     _messageQueue = messageQueue;
     MyTask = new Task(PostingTask, TaskCreationOptions.LongRunning);
 }
Exemple #2
0
        public FileToPost(Settings configuration, WatchFolderSettings folderConfiguration, FileInfo fileToPost)
        {
            this.configuration = configuration;
            this.folderConfiguration = folderConfiguration;
            partSize = configuration.YEncPartSize;

            File = fileToPost;
            DetermineTotalParts();
        }
Exemple #3
0
        static void Main(string[] args)
        {
            var settings = new Settings();

            settings.NewsGroupAddress = "Address of news host";
            settings.NewsGroupPort = 443;
            settings.NewsGroupUsername = "******";
            settings.NewsGroupPassword = "******";
            settings.NewsGroupUseSsl = true;
            settings.ObfuscatedNotificationUrl = "https://apiserver/notify?apikey=etc";
            settings.SearchUrl = "https://apisever/search?apikey=etc";

            settings.MaxConnectionCount = 10;
            settings.WorkingFolderString = "working";
            settings.NzbOutputFolderString = "";
            settings.BackupFolderString = "backup";
            settings.MaxRepostCount = 3;
            settings.PostFailedFolderString = "uploadfailed";
            settings.RarLocation = "";
            settings.ParLocation = "";
            settings.MkvPropEditLocation = "";
            settings.FFmpegLocation = "";
            settings.RemoveAfterVerify = true;
            settings.FilesystemCheckIntervalMillis = 5000;
            settings.FilesystemCheckTesholdMinutes = 5;
            settings.AutoposterIntervalMillis = 5000;
            settings.NotifierIntervalMinutes = 5;
            settings.VerifierIntervalMinutes = 15;
            settings.VerifySimilarityPercentageTreshold = 95;
            settings.RepostAfterMinutes = 240;
            settings.MaxRetryCount = 3;
            settings.InactiveProcessTimeout = 5;
            settings.YEncLineSize = 128;
            settings.YEncLinesPerMessage = 6000;
            settings.DatabaseFile = "";

            settings.RarNParSettings.Add(new RarNParSetting { FromSize = 0, RarSize = 15, Par2Percentage = 10 });
            settings.RarNParSettings.Add(new RarNParSetting { FromSize = 1024, RarSize = 50, Par2Percentage = 10 });
            settings.RarNParSettings.Add(new RarNParSetting { FromSize = 5120, RarSize = 1000, Par2Percentage = 5 });

            var watchfolder = new WatchFolderSettings
            {
                ShortName = "Default",
                PathString = "watch",
                StripFileMetadata = false,
                UseObfuscation = false,
                FromAddress = "*****@*****.**",
                PostTag = "",
                PreTag = "",
                ApplyRandomPassword = false,
                RarPassword=""
            };
            watchfolder.TargetNewsgroups.Add("alt.binaries.multimedia");
            settings.WatchFolderSettings.Add(watchfolder);
            settings.SaveSettings();
        }
        public nntpMessagePoster(Settings configuration, WatchFolderSettings folderConfiguration)
        {
            this.configuration = configuration;
            this.folderConfiguration = folderConfiguration;
            connectionInfo = new NewsHostConnectionInfo()
            {
                Address = configuration.NewsGroupAddress,
                Port = configuration.NewsGroupPort,
                UseSsl = configuration.NewsGroupUseSsl,
                Username = configuration.NewsGroupUsername,
                Password = configuration.NewsGroupPassword
            };

            MessagesToPost = new Queue<nntpMessage>();
            PostingThreads = ConstructPostingThreads();
            IsPosting = false;
        }
 public IndexerNotifier(Settings configuration)
 {
     this.configuration = configuration;
     StopRequested = false;
     MyTask = new Task(IndexerNotifierTask, TaskCreationOptions.LongRunning);
 }