public DiscordSettings Provide() { dynamic settings = SettingsFile.Read(); return(new DiscordSettings { BotToken = settings.ChatClients.Discord.BotToken, CommandPrefix = settings.BotClient.CommandPrefix, MovieDownloadClient = settings.Movies.Client, MovieCommand = settings.Movies.Command, MovieDownloadClientConfigurationHash = ComputeMovieClientConfigurationHashCode(settings), TvShowDownloadClient = settings.TvShows.Client, TvShowCommand = settings.TvShows.Command, TvShowDownloadClientConfigurationHash = ComputeTvClientConfigurationHashCode(settings), StatusMessage = settings.ChatClients.Discord.StatusMessage, MonitoredChannels = settings.ChatClients.Discord.MonitoredChannels.ToObject <string[]>(), TvShowRoles = settings.ChatClients.Discord.TvShowRoles.ToObject <string[]>(), MovieRoles = settings.ChatClients.Discord.MovieRoles.ToObject <string[]>(), ClientID = settings.ChatClients.Discord.ClientId, EnableRequestsThroughDirectMessages = settings.ChatClients.Discord.EnableRequestsThroughDirectMessages, AutomaticallyNotifyRequesters = settings.ChatClients.Discord.AutomaticallyNotifyRequesters, NotificationMode = settings.ChatClients.Discord.NotificationMode, NotificationChannels = settings.ChatClients.Discord.NotificationChannels.ToObject <string[]>(), AutomaticallyPurgeCommandMessages = settings.ChatClients.Discord.AutomaticallyPurgeCommandMessages, DisplayHelpCommandInDMs = settings.ChatClients.Discord.DisplayHelpCommandInDMs, }); }
public ChatClientsSettings Provide() { dynamic settings = SettingsFile.Read(); var discordSettings = new DiscordSettings { BotToken = (string)settings.ChatClients.Discord.BotToken, ClientId = (string)settings.ChatClients.Discord.ClientId, StatusMessage = (string)settings.ChatClients.Discord.StatusMessage, MonitoredChannels = settings.ChatClients.Discord.MonitoredChannels.ToObject <string[]>(), TvShowRoles = settings.ChatClients.Discord.TvShowRoles.ToObject <string[]>(), MovieRoles = settings.ChatClients.Discord.MovieRoles.ToObject <string[]>(), EnableRequestsThroughDirectMessages = (bool)settings.ChatClients.Discord.EnableRequestsThroughDirectMessages, AutomaticallyNotifyRequesters = (bool)settings.ChatClients.Discord.AutomaticallyNotifyRequesters, NotificationMode = (string)settings.ChatClients.Discord.NotificationMode, NotificationChannels = settings.ChatClients.Discord.NotificationChannels.ToObject <string[]>(), AutomaticallyPurgeCommandMessages = (bool)settings.ChatClients.Discord.AutomaticallyPurgeCommandMessages, }; return(new ChatClientsSettings { Discord = discordSettings, Language = settings.ChatClients.Language, }); }
public SonarrSettings Provide() { dynamic settings = SettingsFile.Read(); return(new SonarrSettings { Hostname = settings.DownloadClients.Sonarr.Hostname, BaseUrl = settings.DownloadClients.Sonarr.BaseUrl, Port = (int)settings.DownloadClients.Sonarr.Port, ApiKey = settings.DownloadClients.Sonarr.ApiKey, TvProfileId = settings.DownloadClients.Sonarr.TvProfileId, TvRootFolder = settings.DownloadClients.Sonarr.TvRootFolder, TvLanguageId = settings.DownloadClients.Sonarr.TvLanguageId, TvTags = settings.DownloadClients.Sonarr.TvTags.ToObject <int[]>(), TvUseSeasonFolders = settings.DownloadClients.Sonarr.TvUseSeasonFolders, AnimeProfileId = settings.DownloadClients.Sonarr.AnimeProfileId, AnimeRootFolder = settings.DownloadClients.Sonarr.AnimeRootFolder, AnimeLanguageId = settings.DownloadClients.Sonarr.AnimeLanguageId, AnimeTags = settings.DownloadClients.Sonarr.AnimeTags.ToObject <int[]>(), AnimeUseSeasonFolders = settings.DownloadClients.Sonarr.AnimeUseSeasonFolders, SearchNewRequests = settings.DownloadClients.Sonarr.SearchNewRequests, MonitorNewRequests = settings.DownloadClients.Sonarr.MonitorNewRequests, UseSSL = (bool)settings.DownloadClients.Sonarr.UseSSL, Version = settings.DownloadClients.Sonarr.Version, }); }
public BotClientSettings Provide() { dynamic settings = SettingsFile.Read(); return(new BotClientSettings { Client = (string)settings.BotClient.Client, }); }
public MoviesSettings Provide() { dynamic settings = SettingsFile.Read(); return(new MoviesSettings { Client = settings.Movies.Client, }); }
public TvShowsSettings Provide() { dynamic settings = SettingsFile.Read(); return(new TvShowsSettings { Client = settings.TvShows.Client, Restrictions = settings.TvShows.Restrictions, }); }
public ApplicationSettings Provide() { dynamic settings = SettingsFile.Read(); return(new ApplicationSettings { Port = (int)settings.Port, BaseUrl = (string)settings.BaseUrl, DisableAuthentication = (bool)settings.DisableAuthentication, }); }
public AuthenticationSettings Provide() { dynamic settings = SettingsFile.Read(); return(new AuthenticationSettings { Username = (string)settings.Authentication.Username, Password = (string)settings.Authentication.Password, PrivateKey = (string)settings.Authentication.PrivateKey, }); }
public DownloadClientsSettings Provide() { dynamic settings = SettingsFile.Read(); return(new DownloadClientsSettings { Ombi = new OmbiSettingsProvider().Provide(), Overseerr = new OverseerrSettingsProvider().Provide(), Radarr = new RadarrSettingsProvider().Provide(), Sonarr = new SonarrSettingsProvider().Provide(), }); }
public OmbiSettings Provide() { dynamic settings = SettingsFile.Read(); return(new OmbiSettings { ApiKey = settings.DownloadClients.Ombi.ApiKey, ApiUsername = settings.DownloadClients.Ombi.ApiUsername, Hostname = settings.DownloadClients.Ombi.Hostname, Port = settings.DownloadClients.Ombi.Port, UseSSL = (bool)settings.DownloadClients.Ombi.UseSSL }); }
public OverseerrSettings Provide() { dynamic settings = SettingsFile.Read(); return(new OverseerrSettings { ApiKey = settings.DownloadClients.Overseerr.ApiKey, DefaultApiUserID = settings.DownloadClients.Overseerr.DefaultApiUserID, Hostname = settings.DownloadClients.Overseerr.Hostname, Port = settings.DownloadClients.Overseerr.Port, UseSSL = (bool)settings.DownloadClients.Overseerr.UseSSL }); }
public OverseerrSettings Provide() { dynamic settings = SettingsFile.Read(); return(new OverseerrSettings { ApiKey = settings.DownloadClients.Overseerr.ApiKey, Movies = settings.DownloadClients.Overseerr.Movies.ToObject <OverseerrMovieSettings>(), TvShows = settings.DownloadClients.Overseerr.TvShows.ToObject <OverseerrTvShowSettings>(), Hostname = settings.DownloadClients.Overseerr.Hostname, Port = settings.DownloadClients.Overseerr.Port, UseSSL = (bool)settings.DownloadClients.Overseerr.UseSSL, Version = settings.DownloadClients.Overseerr.Version, }); }
public SonarrSettings Provide() { dynamic settings = SettingsFile.Read(); return(new SonarrSettings { Hostname = settings.DownloadClients.Sonarr.Hostname, BaseUrl = settings.DownloadClients.Sonarr.BaseUrl, Port = (int)settings.DownloadClients.Sonarr.Port, ApiKey = settings.DownloadClients.Sonarr.ApiKey, Categories = settings.DownloadClients.Sonarr.Categories.ToObject <SonarrCategory[]>(), SearchNewRequests = settings.DownloadClients.Sonarr.SearchNewRequests, MonitorNewRequests = settings.DownloadClients.Sonarr.MonitorNewRequests, UseSSL = (bool)settings.DownloadClients.Sonarr.UseSSL, Version = settings.DownloadClients.Sonarr.Version, }); }
public RadarrSettings Provide() { dynamic settings = SettingsFile.Read(); return(new RadarrSettings { Hostname = settings.DownloadClients.Radarr.Hostname, Port = (int)settings.DownloadClients.Radarr.Port, ApiKey = settings.DownloadClients.Radarr.ApiKey, MovieProfileId = (int)settings.DownloadClients.Radarr.MovieProfileId, MovieRootFolder = settings.DownloadClients.Radarr.MovieRootFolder, MovieMinimumAvailability = settings.DownloadClients.Radarr.MovieMinimumAvailability, MovieTags = settings.DownloadClients.Radarr.MovieTags.ToObject <int[]>(), AnimeProfileId = (int)settings.DownloadClients.Radarr.AnimeProfileId, AnimeRootFolder = settings.DownloadClients.Radarr.AnimeRootFolder, AnimeMinimumAvailability = settings.DownloadClients.Radarr.AnimeMinimumAvailability, AnimeTags = settings.DownloadClients.Radarr.AnimeTags.ToObject <int[]>(), UseSSL = (bool)settings.DownloadClients.Radarr.UseSSL, Version = settings.DownloadClients.Radarr.Version, }); }
public DiscordSettings Provide() { dynamic settings = SettingsFile.Read(); string monitoredChannels = settings.BotClient.MonitoredChannels; return new DiscordSettings { BotToken = settings.ChatClients.Discord.BotToken, CommandPrefix = settings.BotClient.CommandPrefix, MovieDownloadClient = settings.Movies.Client, MovieCommand = settings.Movies.Command, MovieDownloadClientConfigurationHash = ComputeMovieClientConfigurationHashCode(settings), TvShowDownloadClient = settings.TvShows.Client, TvShowCommand = settings.TvShows.Command, TvShowDownloadClientConfigurationHash = ComputeTvClientConfigurationHashCode(settings), StatusMessage = settings.ChatClients.Discord.StatusMessage, MonitoredChannels = monitoredChannels.Split(" ").Where(s => !string.IsNullOrWhiteSpace(s)).ToArray(), ClientID = settings.ChatClients.Discord.ClientId, EnableDirectMessageSupport = settings.ChatClients.Discord.EnableDirectMessageSupport }; }