Exemplo n.º 1
0
 public HitomiSetting()
 {
     if (File.Exists(log_path))
     {
         model = JsonConvert.DeserializeObject <HitomiSettingModel>(File.ReadAllText(log_path));
     }
     if (model == null)
     {
         model                      = new HitomiSettingModel();
         model.Path                 = @"C:\Hitomi\{Artists}\[{Id}] {Title}\";
         model.ExclusiveTag         = new string[] { "female:mother", "male:anal", "male:guro", "female:guro", "male:snuff", "female:snuff" };
         model.Zip                  = false;
         model.MaximumThumbnailShow = 1000;
         model.Thread               = 32;
         Save();
     }
     else
     {
         if (String.IsNullOrEmpty(model.Path))
         {
             model.Path = @"C:\Hitomi\{Artists}\[{Id}] {Title}\";
         }
         if (model.MaximumThumbnailShow < 10)
         {
             model.MaximumThumbnailShow = 1000;
         }
         if (model.Thread < 5)
         {
             model.Thread = 32;
         }
         Save();
     }
 }
Exemplo n.º 2
0
 public HitomiSetting()
 {
     if (File.Exists(log_path))
     {
         model = JsonConvert.DeserializeObject <HitomiSettingModel>(File.ReadAllText(log_path));
     }
     if (model == null)
     {
         model                      = new HitomiSettingModel();
         model.Path                 = @"C:\Hitomi\{Artists}\[{Id}] {Title}\";
         model.ExclusiveTag         = new string[] { "female:mother", "male:anal", "male:guro", "female:guro", "male:snuff", "female:snuff" };
         model.Zip                  = false;
         model.MaximumThumbnailShow = 1000;
         model.Thread               = Environment.ProcessorCount * 3;
         model.Language             = "korean";
         model.WaitInfinite         = false;
         model.WaitTimeout          = 10000;
         model.SaveJson             = true;
         Save();
     }
     else
     {
         if (String.IsNullOrEmpty(model.Path))
         {
             model.Path = @"C:\Hitomi\{Artists}\[{Id}] {Title}\";
         }
         if (model.MaximumThumbnailShow < 10)
         {
             model.MaximumThumbnailShow = 1000;
         }
         if (model.Thread < 5)
         {
             model.Thread = 32;
         }
         if (!HitomiData.Instance.GetLanguageList().Contains(model.Language) && model.Language != "N/A")
         {
             model.Language = "korean";
         }
         if (model.WaitTimeout == 0 && model.WaitInfinite == false)
         {
             model.WaitInfinite = true; model.WaitTimeout = 10000;
         }
         Save();
     }
 }
Exemplo n.º 3
0
 public HitomiSetting()
 {
     if (File.Exists(log_path))
     {
         model = JsonConvert.DeserializeObject <HitomiSettingModel>(File.ReadAllText(log_path));
     }
     if (model == null)
     {
         model                              = new HitomiSettingModel();
         model.Path                         = @"C:\Hitomi\{Artists}\[{Id}] {Title}\";
         model.MarumaruPath                 = AppDomain.CurrentDomain.BaseDirectory;
         model.ExclusiveTag                 = new string[] { "female:mother", "male:anal", "male:guro", "female:guro", "male:snuff", "female:snuff" };
         model.Zip                          = false;
         model.MaximumThumbnailShow         = 1000;
         model.Thread                       = Environment.ProcessorCount * 3;
         model.Language                     = "korean";
         model.WaitInfinite                 = false;
         model.WaitTimeout                  = 10000;
         model.SaveJson                     = true;
         model.RecommendPerScroll           = 10;
         model.TextMatchingAccuracy         = 5;
         model.RecommendNMultipleWithLength = false;
         model.RecommendLanguageALL         = false;
         model.ReplaceArtistsWithTitle      = false;
         model.UsingLog                     = false;
         model.DetailedLog                  = false;
         model.RecommendAutoRemove          = false;
         model.DetailedSearchResult         = false;
         model.UsingExHentaiBaseOpener      = false;
         model.UsingDriver                  = false;
         model.LatestNotice                 = 0;
         model.UsingXiAanlysis              = false;
         model.UsingOnlyFMTagsOnAnalysis    = false;
         model.CustomAutoComplete           = new string[] { "recent:0-25" };
         model.AutoSync                     = false;
         model.OpenWithFinder               = true;
         model.LoadPreviewMaximum           = 500;
         model.ShowPageCount                = false;
         model.AutoCompleteShowCount        = 30;
         model.NotifySyncDelay              = 24 * 3;
         model.UsingOptimization            = false;
         model.OffPackageViewer             = false;
         Save();
     }
     else
     {
         if (String.IsNullOrEmpty(model.Path))
         {
             model.Path = @"C:\Hitomi\{Artists}\[{Id}] {Title}\";
         }
         if (String.IsNullOrEmpty(model.MarumaruPath))
         {
             model.MarumaruPath = AppDomain.CurrentDomain.BaseDirectory;
         }
         if (model.MaximumThumbnailShow < 10)
         {
             model.MaximumThumbnailShow = 1000;
         }
         if (model.Thread < 5)
         {
             model.Thread = 32;
         }
         if (model.Thread > 64)
         {
             model.Thread = 64;
         }
         if (HitomiData.Instance.metadata_collection != null && !HitomiData.Instance.GetLanguageList().Contains(model.Language) && model.Language != "N/A" && model.Language != "ALL")
         {
             model.Language = "korean";
         }
         if (model.WaitTimeout == 0 && model.WaitInfinite == false)
         {
             model.WaitInfinite = true; model.WaitTimeout = 10000;
         }
         if (model.RecommendPerScroll < 10)
         {
             model.RecommendPerScroll = 10;
         }
         if (model.TextMatchingAccuracy > 20 || model.TextMatchingAccuracy < 2)
         {
             model.TextMatchingAccuracy = 5;
         }
         if (model.CustomAutoComplete == null)
         {
             model.CustomAutoComplete = new string[] { "recent:0-25" }
         }
         ;
         if (model.LoadPreviewMaximum <= 0)
         {
             model.LoadPreviewMaximum = 500;
         }
         if (model.AutoCompleteShowCount < 30)
         {
             model.AutoCompleteShowCount = 30;
         }
         if (model.NotifySyncDelay < 24)
         {
             model.NotifySyncDelay = 24 * 3;
         }
         Save();
     }
 }
Exemplo n.º 4
0
 public HitomiSetting()
 {
     if (File.Exists(log_path))
     {
         model = JsonConvert.DeserializeObject <HitomiSettingModel>(File.ReadAllText(log_path));
     }
     if (model == null)
     {
         model                              = new HitomiSettingModel();
         model.Path                         = @"C:\Hitomi\{Artists}\[{Id}] {Title}\";
         model.ExclusiveTag                 = new string[] { "female:mother", "male:anal", "male:guro", "female:guro", "male:snuff", "female:snuff" };
         model.Zip                          = false;
         model.MaximumThumbnailShow         = 1000;
         model.Thread                       = Environment.ProcessorCount * 3;
         model.Language                     = "korean";
         model.WaitInfinite                 = false;
         model.WaitTimeout                  = 10000;
         model.SaveJson                     = true;
         model.RecommendPerScroll           = 10;
         model.TextMatchingAccuracy         = 5;
         model.RecommendNMultipleWithLength = false;
         model.RecommendLanguageALL         = false;
         model.ReplaceArtistsWithTitle      = false;
         model.UsingLog                     = false;
         model.DetailedLog                  = false;
         model.RecommendAutoRemove          = false;
         model.DetailedSearchResult         = false;
         model.UsingExHentaiBaseOpener      = false;
         Save();
     }
     else
     {
         if (String.IsNullOrEmpty(model.Path))
         {
             model.Path = @"C:\Hitomi\{Artists}\[{Id}] {Title}\";
         }
         if (model.MaximumThumbnailShow < 10)
         {
             model.MaximumThumbnailShow = 1000;
         }
         if (model.Thread < 5)
         {
             model.Thread = 32;
         }
         if (!HitomiData.Instance.GetLanguageList().Contains(model.Language) && model.Language != "N/A" && model.Language != "ALL")
         {
             model.Language = "korean";
         }
         if (model.WaitTimeout == 0 && model.WaitInfinite == false)
         {
             model.WaitInfinite = true; model.WaitTimeout = 10000;
         }
         if (model.RecommendPerScroll < 10)
         {
             model.RecommendPerScroll = 10;
         }
         if (model.TextMatchingAccuracy > 20 || model.TextMatchingAccuracy < 2)
         {
             model.TextMatchingAccuracy = 5;
         }
         Save();
     }
 }