public IMassUploaderBuilder Turbobit(string id, string password)
 {
     if (!string.IsNullOrEmpty(id) && !string.IsNullOrEmpty(password))
     {
         turbotBitAccount = new Classes.NetworkAccount {
             Id = id, Password = password
         };
     }
     return(this);
 }
 public IMassUploaderBuilder Uptobox(string id, string password)
 {
     if (!string.IsNullOrEmpty(id) && !string.IsNullOrEmpty(password))
     {
         uptoboxAccount = new Classes.NetworkAccount {
             Id = id, Password = password
         };
     }
     return(this);
 }
예제 #3
0
        public MassUploader(Classes.NetworkAccount uptoboxAccount, Classes.NetworkAccount megaAccount, Classes.NetworkAccount dropboxAccount, Classes.NetworkAccount unFichierAccount,Classes.NetworkAccount turbotBitAccount, bool enableLogs, Enums.LogLevel logLevel)
        {
            if (enableLogs) logger = new Logger(logLevel);

            if (uptoboxAccount != null)
            {
                uptboxSession = new Classes.NetworkSession(uptoboxAccount);
                uptboxSession.NetworkStatus = Enums.NetworkStatus.Enabled;

                if (logger != null) logger.WriteLog("Build", $"Uptobox is enabled, {uptoboxAccount.Id}:{uptoboxAccount.Password}");
            }
            if (megaAccount != null)
            {
                megaSession = new Classes.NetworkSession(megaAccount);
                megaSession.NetworkStatus = Enums.NetworkStatus.Enabled;
                if (logger != null) logger.WriteLog("Build", $"MEGA is enabled, {megaAccount.Id}:{megaAccount.Password}");

            }
            if (dropboxAccount != null)
            {
                dropboxSession = new Classes.NetworkSession(dropboxAccount);
                dropboxSession.NetworkStatus = Enums.NetworkStatus.Enabled;
                if (logger != null) logger.WriteLog("Build", $"Dropbox is enabled, {dropboxAccount.Id}:{dropboxAccount.Password}");

            }
            if (unFichierAccount != null)
            {
                unFichierSession = new Classes.NetworkSession(unFichierAccount);
                unFichierSession.NetworkStatus = Enums.NetworkStatus.Enabled;
                if (logger != null) logger.WriteLog("Build", $"1Fichier is enabled, {unFichierAccount.Id}:{unFichierAccount.Password}");

            }
            if (turbotBitAccount != null)
            {
                turbotBitSession = new NetworkSession(turbotBitAccount);
                turbotBitSession.NetworkStatus = Enums.NetworkStatus.Enabled;
                if (logger != null) logger.WriteLog("Build", $"TurbotBit is enabled, {turbotBitAccount.Id}:{turbotBitAccount.Password}");

            }

            upload = new Processor.Upload(uptboxSession, megaSession, dropboxSession, unFichierSession,turbotBitSession, logger);

        }