public MediaCoverModule(IAppFolderInfo appFolderInfo, IDiskProvider diskProvider) : base("MediaCover") { _appFolderInfo = appFolderInfo; _diskProvider = diskProvider; Get[MEDIA_COVER_ROUTE] = options => GetMediaCover(options.seriesId, options.filename); }
public UpdateLogFileModule(IAppFolderInfo appFolderInfo, IDiskProvider diskProvider, IConfigFileProvider configFileProvider) : base(diskProvider, configFileProvider, "/update") { _appFolderInfo = appFolderInfo; _diskProvider = diskProvider; }
public BackupAppData(IAppFolderInfo appFolderInfo, IDiskProvider diskProvider, IDiskTransferService diskTransferService, Logger logger) { _appFolderInfo = appFolderInfo; _diskProvider = diskProvider; _diskTransferService = diskTransferService; _logger = logger; }
public SystemModule(IAppFolderInfo appFolderInfo, IRuntimeInfo runtimeInfo, IRouteCacheProvider routeCacheProvider, IConfigFileProvider configFileProvider) : base("system") { _appFolderInfo = appFolderInfo; _runtimeInfo = runtimeInfo; _routeCacheProvider = routeCacheProvider; _configFileProvider = configFileProvider; Get["/status"] = x => GetStatus(); Get["/routes"] = x => GetRoutes(); }
public IndexHtmlMapper(IAppFolderInfo appFolderInfo, IDiskProvider diskProvider, IConfigFileProvider configFileProvider, Logger logger) : base(diskProvider, logger) { _diskProvider = diskProvider; _configFileProvider = configFileProvider; _indexPath = Path.Combine(appFolderInfo.StartUpFolder, "UI", "index.html"); }
public UpdateCheck(IDiskProvider diskProvider, IAppFolderInfo appFolderInfo, ICheckUpdateService checkUpdateService, IConfigFileProvider configFileProvider) { _diskProvider = diskProvider; _appFolderInfo = appFolderInfo; _checkUpdateService = checkUpdateService; _configFileProvider = configFileProvider; }
public InstallUpdateService(IDiskProvider diskProvider, IDetectApplicationType detectApplicationType, ITerminateNzbDrone terminateNzbDrone, IAppFolderInfo appFolderInfo, IBackupAndRestore backupAndRestore, IStartNzbDrone startNzbDrone, Logger logger) { _diskProvider = diskProvider; _detectApplicationType = detectApplicationType; _terminateNzbDrone = terminateNzbDrone; _appFolderInfo = appFolderInfo; _backupAndRestore = backupAndRestore; _startNzbDrone = startNzbDrone; _logger = logger; }
public IndexHtmlMapper(IAppFolderInfo appFolderInfo, IDiskProvider diskProvider, IConfigFileProvider configFileProvider, Logger logger) : base(diskProvider, logger) { _diskProvider = diskProvider; _indexPath = Path.Combine(appFolderInfo.StartUpFolder, "UI", "index.html"); API_KEY = configFileProvider.ApiKey; URL_BASE = configFileProvider.UrlBase; }
public LoginHtmlMapper(IAppFolderInfo appFolderInfo, IDiskProvider diskProvider, IConfigFileProvider configFileProvider, Func<ICacheBreakerProvider> cacheBreakProviderFactory, Logger logger) : base(diskProvider, logger) { _diskProvider = diskProvider; _cacheBreakProviderFactory = cacheBreakProviderFactory; _indexPath = Path.Combine(appFolderInfo.StartUpFolder, "UI", "login.html"); URL_BASE = configFileProvider.UrlBase; }
public IndexHtmlMapper(IAppFolderInfo appFolderInfo, IDiskProvider diskProvider, IConfigFileProvider configFileProvider, IAnalyticsService analyticsService, Func<ICacheBreakerProvider> cacheBreakProviderFactory, Logger logger) : base(diskProvider, logger) { _diskProvider = diskProvider; _configFileProvider = configFileProvider; _analyticsService = analyticsService; _cacheBreakProviderFactory = cacheBreakProviderFactory; _indexPath = Path.Combine(appFolderInfo.StartUpFolder, "UI", "index.html"); API_KEY = configFileProvider.ApiKey; URL_BASE = configFileProvider.UrlBase; }
public SystemModule(IAppFolderInfo appFolderInfo, IRuntimeInfo runtimeInfo, IRouteCacheProvider routeCacheProvider, IConfigFileProvider configFileProvider, IMainDatabase database, ILifecycleService lifecycleService) : base("system") { _appFolderInfo = appFolderInfo; _runtimeInfo = runtimeInfo; _routeCacheProvider = routeCacheProvider; _configFileProvider = configFileProvider; _database = database; _lifecycleService = lifecycleService; Get["/status"] = x => GetStatus(); Get["/routes"] = x => GetRoutes(); Post["/shutdown"] = x => Shutdown(); Post["/restart"] = x => Restart(); }
private static void RegisterAppFile(IAppFolderInfo appFolderInfo) { var fileTarget = new FileTarget(); fileTarget.Name = "rollingFileLogger"; fileTarget.FileName = Path.Combine(appFolderInfo.GetLogFolder(), "nzbdrone.txt"); fileTarget.AutoFlush = true; fileTarget.KeepFileOpen = false; fileTarget.ConcurrentWrites = false; fileTarget.ConcurrentWriteAttemptDelay = 50; fileTarget.ConcurrentWriteAttempts = 10; fileTarget.ArchiveAboveSize = 1024000; fileTarget.MaxArchiveFiles = 5; fileTarget.EnableFileDelete = true; fileTarget.ArchiveNumbering = ArchiveNumberingMode.Rolling; fileTarget.Layout = FILE_LOG_LAYOUT; var loggingRule = new LoggingRule("*", LogLevel.Info, fileTarget); LogManager.Configuration.AddTarget("appfile", fileTarget); LogManager.Configuration.LoggingRules.Add(loggingRule); }
public InstallUpdateService(IDiskProvider diskProvider, IDiskTransferService diskTransferService, IDetectApplicationType detectApplicationType, IDetectExistingVersion detectExistingVersion, ITerminateNzbDrone terminateNzbDrone, IAppFolderInfo appFolderInfo, IBackupAndRestore backupAndRestore, IBackupAppData backupAppData, IStartNzbDrone startNzbDrone, IProcessProvider processProvider, Logger logger) { _diskProvider = diskProvider; _diskTransferService = diskTransferService; _detectApplicationType = detectApplicationType; _detectExistingVersion = detectExistingVersion; _terminateNzbDrone = terminateNzbDrone; _appFolderInfo = appFolderInfo; _backupAndRestore = backupAndRestore; _backupAppData = backupAppData; _startNzbDrone = startNzbDrone; _processProvider = processProvider; _logger = logger; }
public BackupAndRestore(IDiskProvider diskProvider, IAppFolderInfo appFolderInfo, Logger logger) { _diskProvider = diskProvider; _appFolderInfo = appFolderInfo; _logger = logger; }
public StartupFolderValidator(IAppFolderInfo appFolderInfo) : base("Path cannot be an ancestor of the start up folder") { _appFolderInfo = appFolderInfo; }
public static string GetNlogConfigPath(this IAppFolderInfo appFolderInfo) { return(Path.Combine(appFolderInfo.StartUpFolder, NLOG_CONFIG_FILE)); }
private static void RegisterUpdateFile(IAppFolderInfo appFolderInfo) { var fileTarget = new FileTarget(); fileTarget.Name = "updateFileLogger"; fileTarget.FileName = Path.Combine(appFolderInfo.GetUpdateLogFolder(), DateTime.Now.ToString("yy.MM.d-HH.mm") + ".txt"); fileTarget.AutoFlush = true; fileTarget.KeepFileOpen = false; fileTarget.ConcurrentWrites = false; fileTarget.ConcurrentWriteAttemptDelay = 50; fileTarget.ConcurrentWriteAttempts = 100; fileTarget.Layout = FILE_LOG_LAYOUT; var loggingRule = new LoggingRule("*", LogLevel.Trace, fileTarget); LogManager.Configuration.AddTarget("updateFile", fileTarget); LogManager.Configuration.LoggingRules.Add(loggingRule); }
private static void RegisterAppFile(IAppFolderInfo appFolderInfo) { RegisterAppFile(appFolderInfo, "appFileInfo", "sonarr.txt", 5, LogLevel.Info); RegisterAppFile(appFolderInfo, "appFileDebug", "sonarr.debug.txt", 50, LogLevel.Off); RegisterAppFile(appFolderInfo, "appFileTrace", "sonarr.trace.txt", 50, LogLevel.Off); }
public RobotsTxtMapper(IAppFolderInfo appFolderInfo, IDiskProvider diskProvider, Logger logger) : base(diskProvider, logger) { _appFolderInfo = appFolderInfo; }
public BackupAppData(IAppFolderInfo appFolderInfo, IDiskProvider diskProvider, Logger logger) { _appFolderInfo = appFolderInfo; _diskProvider = diskProvider; _logger = logger; }
public UpdateLogFileMapper(IAppFolderInfo appFolderInfo, IDiskProvider diskProvider, Logger logger) : base(diskProvider, logger) { _appFolderInfo = appFolderInfo; }
public ConnectionStringFactory(IAppFolderInfo appFolderInfo) { MainDbConnectionString = GetConnectionString(appFolderInfo.GetNzbDroneDatabase()); LogDbConnectionString = GetConnectionString(appFolderInfo.GetLogDatabase()); }
public PidFileProvider(IAppFolderInfo appFolderInfo, IProcessProvider processProvider, Logger logger) { _appFolderInfo = appFolderInfo; _processProvider = processProvider; _logger = logger; }
public AppDataLocationCheck(IAppFolderInfo appFolderInfo) { _appFolderInfo = appFolderInfo; }
public DeleteLogFilesService(IDiskProvider diskProvider, IAppFolderInfo appFolderInfo, Logger logger) { _diskProvider = diskProvider; _appFolderInfo = appFolderInfo; _logger = logger; }
public RobotsTxtMapper(IAppFolderInfo appFolderInfo, IDiskProvider diskProvider, IConfigFileProvider configFileProvider, Logger logger) : base(diskProvider, logger) { _appFolderInfo = appFolderInfo; _configFileProvider = configFileProvider; }
public StaticResourceMapper(IAppFolderInfo appFolderInfo, IDiskProvider diskProvider, IConfigFileProvider configFileProvider, Logger logger) : base(diskProvider, logger) { _appFolderInfo = appFolderInfo; _configFileProvider = configFileProvider; }
public static string GetUpdateClientExePath(this IAppFolderInfo appFolderInfo) { return(Path.Combine(GetUpdateSandboxFolder(appFolderInfo), UPDATE_CLIENT_EXE)); }
public static string GetAppDataPath(this IAppFolderInfo appFolderInfo) { return(appFolderInfo.AppDataFolder); }
public static string GetLogFolder(this IAppFolderInfo appFolderInfo) { return(Path.Combine(GetAppDataPath(appFolderInfo), "logs")); }
public static string GetBackupFolder(this IAppFolderInfo appFolderInfo) { return(Path.Combine(GetAppDataPath(appFolderInfo), BACKUP_FOLDER)); }
private static void RegisterAppFile(IAppFolderInfo appFolderInfo) { RegisterAppFile(appFolderInfo, "appFileInfo", "radarr.txt", 5, LogLevel.Info); RegisterAppFile(appFolderInfo, "appFileDebug", "radarr.debug.txt", 50, LogLevel.Off); RegisterAppFile(appFolderInfo, "appFileTrace", "radarr.trace.txt", 50, LogLevel.Off); }
public static string GetConfigBackupFile(this IAppFolderInfo appFolderInfo) { return(Path.Combine(GetAppDataPath(appFolderInfo), BACKUP_ZIP_FILE)); }
private static LoggingRule RegisterAppFile(IAppFolderInfo appFolderInfo, string name, string fileName, int maxArchiveFiles, LogLevel minLogLevel) { var fileTarget = new NzbDroneFileTarget(); fileTarget.Name = name; fileTarget.FileName = Path.Combine(appFolderInfo.GetLogFolder(), fileName); fileTarget.AutoFlush = true; fileTarget.KeepFileOpen = false; fileTarget.ConcurrentWrites = false; fileTarget.ConcurrentWriteAttemptDelay = 50; fileTarget.ConcurrentWriteAttempts = 10; fileTarget.ArchiveAboveSize = 1024000; fileTarget.MaxArchiveFiles = maxArchiveFiles; fileTarget.EnableFileDelete = true; fileTarget.ArchiveNumbering = ArchiveNumberingMode.Rolling; fileTarget.Layout = FILE_LOG_LAYOUT; var loggingRule = new LoggingRule("*", minLogLevel, fileTarget); LogManager.Configuration.AddTarget(name, fileTarget); LogManager.Configuration.LoggingRules.Add(loggingRule); return loggingRule; }
public StaticResourceMapper(IAppFolderInfo appFolderInfo, IDiskProvider diskProvider, Logger logger) : base(diskProvider, logger) { _appFolderInfo = appFolderInfo; }
public static string GetConfigPath(this IAppFolderInfo appFolderInfo) { return(Path.Combine(GetAppDataPath(appFolderInfo), APP_CONFIG_FILE)); }
public static string GetLogDatabase(this IAppFolderInfo appFolderInfo) { return(Path.Combine(GetAppDataPath(appFolderInfo), NZBDRONE_LOG_DB)); }
public FaviconMapper(IAppFolderInfo appFolderInfo, IDiskProvider diskProvider, Logger logger) : base(diskProvider, logger) { _appFolderInfo = appFolderInfo; }
public static string GetMediaCoverPath(this IAppFolderInfo appFolderInfo) { return(Path.Combine(GetAppDataPath(appFolderInfo), "MediaCover")); }
public static string GetUpdateLogFolder(this IAppFolderInfo appFolderInfo) { return(Path.Combine(GetAppDataPath(appFolderInfo), UPDATE_LOG_FOLDER_NAME)); }
public static string GetUpdatePackageFolder(this IAppFolderInfo appFolderInfo) { return(Path.Combine(GetUpdateSandboxFolder(appFolderInfo), UPDATE_PACKAGE_FOLDER_NAME)); }
public MediaCoverMapper(IAppFolderInfo appFolderInfo, IDiskProvider diskProvider, Logger logger) : base(diskProvider, logger) { _appFolderInfo = appFolderInfo; _diskProvider = diskProvider; }
public static string GetDatabaseRestore(this IAppFolderInfo appFolderInfo) { return(Path.Combine(GetAppDataPath(appFolderInfo), DB_RESTORE)); }
public UpdateCheck(IDiskProvider diskProvider, IAppFolderInfo appFolderInfo, ICheckUpdateService checkUpdateService) { _diskProvider = diskProvider; _appFolderInfo = appFolderInfo; _checkUpdateService = checkUpdateService; }
public static string GetUpdateClientFolder(this IAppFolderInfo appFolderInfo) { return(Path.Combine(GetUpdatePackageFolder(appFolderInfo), UPDATE_CLIENT_FOLDER_NAME)); }
public static string GetUpdateSandboxFolder(this IAppFolderInfo appFolderInfo) { return(Path.Combine(appFolderInfo.TempFolder, UPDATE_SANDBOX_FOLDER_NAME)); }
public BackupFileMapper(IAppFolderInfo appFolderInfo, IDiskProvider diskProvider, Logger logger) : base(diskProvider, logger) { _appFolderInfo = appFolderInfo; }
public static string GetUpdateBackUpAppDataFolder(this IAppFolderInfo appFolderInfo) { return(Path.Combine(GetUpdateSandboxFolder(appFolderInfo), UPDATE_BACKUP_APPDATA_FOLDER_NAME)); }
public static string GetUpdateBackupConfigFile(this IAppFolderInfo appFolderInfo) { return(Path.Combine(GetUpdateBackUpAppDataFolder(appFolderInfo), APP_CONFIG_FILE)); }
public AppFolderFactory(IAppFolderInfo appFolderInfo, IDiskProvider diskProvider) { _appFolderInfo = appFolderInfo; _diskProvider = diskProvider; _logger = NzbDroneLogger.GetLogger(this); }
public static string GetUpdateBackupDatabase(this IAppFolderInfo appFolderInfo) { return(Path.Combine(GetUpdateBackUpAppDataFolder(appFolderInfo), DB)); }