<commit_before>﻿using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using anime_downloader.Classes;
using anime_downloader.Models;
using anime_downloader.Models.Configurations;
using anime_downloader.Services.Interfaces;
using GalaSoft.MvvmLight;
using Settings = anime_downloader.Properties.Settings;

namespace anime_downloader.Services
{
    public class SettingsService: ISettingsService
    {
        public SettingsService()
        {
            if (Settings.Default.Animes == null)
                Settings.Default.Animes = new List<Anime>();
            if (Settings.Default.Subgroups == null)
                Settings.Default.Subgroups = new List<string>();

            if (Settings.Default.PathConfiguration == null)
                Settings.Default.PathConfiguration = new PathConfiguration();
            if (Settings.Default.FlagConfiguration == null)
                Settings.Default.FlagConfiguration = new FlagConfiguration();
            if (Settings.Default.MyAnimeListConfiguration == null)
                Settings.Default.MyAnimeListConfiguration = new MyAnimeListConfiguration();
        }

        public PathConfiguration PathConfig
        {
            get { return Settings.Default.PathConfiguration; }
            set { Settings.Default.PathConfiguration = value; }
        }

        public FlagConfiguration FlagConfig
        {
            get { return Settings.Default.FlagConfiguration; }
            set { Settings.Default.FlagConfiguration = value; }
        }

        public MyAnimeListConfiguration MyAnimeListConfig
        {
            get { return Settings.Default.MyAnimeListConfiguration; }
            set { Settings.Default.MyAnimeListConfiguration = value; }
        }

        // 

        public List<string> Subgroups
        {
            get { return Settings.Default.Subgroups; }<commit_msg>Change default settings initialization<commit_after>﻿using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using anime_downloader.Classes;
using anime_downloader.Models;
using anime_downloader.Models.Configurations;
using anime_downloader.Services.Interfaces;
using GalaSoft.MvvmLight;
using Settings = anime_downloader.Properties.Settings;

namespace anime_downloader.Services
{
    public class SettingsService: ISettingsService
    {
        public SettingsService()
        {
            if (Settings.Default.Animes == null)
                Settings.Default.Animes = new List<Anime>();
            if (Settings.Default.Subgroups == null)
                Settings.Default.Subgroups = new List<string>();

            if (Settings.Default.PathConfiguration == null)
                Settings.Default.PathConfiguration = new PathConfiguration();
            if (Settings.Default.FlagConfiguration == null)
                Settings.Default.FlagConfiguration = new FlagConfiguration {AlwaysShowTray = true, ExitOnClose = false} ;
            if (Settings.Default.MyAnimeListConfiguration == null)
                Settings.Default.MyAnimeListConfiguration = new MyAnimeListConfiguration();
        }

        public PathConfiguration PathConfig
        {
            get { return Settings.Default.PathConfiguration; }
            set { Settings.Default.PathConfiguration = value; }
        }

        public FlagConfiguration FlagConfig
        {
            get { return Settings.Default.FlagConfiguration; }
            set { Settings.Default.FlagConfiguration = value; }
        }

        public MyAnimeListConfiguration MyAnimeListConfig
        {
            get { return Settings.Default.MyAnimeListConfiguration; }
            set { Settings.Default.MyAnimeListConfiguration = value; }
        }

        // 

        public List<string> Subgroups
        {
            get { return Settings.Default.Subgroups; }
{'fraction_non_alphanumeric': 0.07833376997642127, 'fraction_numerical': 0.0, 'mean_word_length': 2.5059687786960514, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2640441', 'n_tokens_mistral': 908, 'n_tokens_neox': 883, 'n_words': 187}