using System; using System.ComponentModel.DataAnnotations; using API.Services; namespace API.DTOs.Settings; public class ServerSettingDto { public string CacheDirectory { get; set; } public string TaskScan { get; set; } /// /// Logging level for server. Managed in appsettings.json. /// public string LoggingLevel { get; set; } public string TaskBackup { get; set; } /// /// Port the server listens on. Managed in appsettings.json. /// public int Port { get; set; } /// /// Allows anonymous information to be collected and sent to KavitaStats /// public bool AllowStatCollection { get; set; } /// /// Enables OPDS connections to be made to the server. /// public bool EnableOpds { get; set; } /// /// Base Url for the kavita. Requires restart to take effect. /// public string BaseUrl { get; set; } /// /// Where Bookmarks are stored. /// /// If null or empty string, will default back to default install setting aka public string BookmarksDirectory { get; set; } /// /// Email service to use for the invite user flow, forgot password, etc. /// /// If null or empty string, will default back to default install setting aka public string EmailServiceUrl { get; set; } public string InstallVersion { get; set; } /// /// Represents a unique Id to this Kavita installation. Only used in Stats to identify unique installs. /// public string InstallId { get; set; } /// /// If the server should save bookmarks as WebP encoding /// public bool ConvertBookmarkToWebP { get; set; } /// /// If the Swagger UI Should be exposed. Does not require authentication, but does require a JWT. /// [Obsolete("Being removed in v0.7 in favor of dedicated hosted api")] public bool EnableSwaggerUi { get; set; } /// /// The amount of Backups before cleanup /// /// Value should be between 1 and 30 public int TotalBackups { get; set; } = 30; /// /// If Kavita should watch the library folders and process changes /// public bool EnableFolderWatching { get; set; } = true; /// /// Total number of days worth of logs to keep at a given time. /// /// Value should be between 1 and 30 public int TotalLogs { get; set; } /// /// If the server should save covers as WebP encoding /// public bool ConvertCoverToWebP { get; set; } }