Kavita/API/DTOs/Settings/ServerSettingDTO.cs
Joseph Milazzo 037a1a5a8c
Folder Watching (#1467)
* Hooked in a server setting to enable/disable folder watching

* Validated the file rename change event

* Validated delete file works

* Tweaked some logic to determine if a change occurs on a folder or a file.

* Added a note for an upcoming branch

* Some minor changes in the loop that just shift where code runs.

* Implemented ScanFolder api

* Ensure we restart watchers when we modify a library folder.

* Fixed a unit test
2022-08-23 09:45:11 -07:00

65 lines
2.6 KiB
C#

using API.Services;
namespace API.DTOs.Settings
{
public class ServerSettingDto
{
public string CacheDirectory { get; set; }
public string TaskScan { get; set; }
/// <summary>
/// Logging level for server. Managed in appsettings.json.
/// </summary>
public string LoggingLevel { get; set; }
public string TaskBackup { get; set; }
/// <summary>
/// Port the server listens on. Managed in appsettings.json.
/// </summary>
public int Port { get; set; }
/// <summary>
/// Allows anonymous information to be collected and sent to KavitaStats
/// </summary>
public bool AllowStatCollection { get; set; }
/// <summary>
/// Enables OPDS connections to be made to the server.
/// </summary>
public bool EnableOpds { get; set; }
/// <summary>
/// Base Url for the kavita. Requires restart to take effect.
/// </summary>
public string BaseUrl { get; set; }
/// <summary>
/// Where Bookmarks are stored.
/// </summary>
/// <remarks>If null or empty string, will default back to default install setting aka <see cref="DirectoryService.BookmarkDirectory"/></remarks>
public string BookmarksDirectory { get; set; }
/// <summary>
/// Email service to use for the invite user flow, forgot password, etc.
/// </summary>
/// <remarks>If null or empty string, will default back to default install setting aka <see cref="EmailService.DefaultApiUrl"/></remarks>
public string EmailServiceUrl { get; set; }
public string InstallVersion { get; set; }
/// <summary>
/// Represents a unique Id to this Kavita installation. Only used in Stats to identify unique installs.
/// </summary>
public string InstallId { get; set; }
/// <summary>
/// If the server should save bookmarks as WebP encoding
/// </summary>
public bool ConvertBookmarkToWebP { get; set; }
/// <summary>
/// If the Swagger UI Should be exposed. Does not require authentication, but does require a JWT.
/// </summary>
public bool EnableSwaggerUi { get; set; }
/// <summary>
/// The amount of Backups before cleanup
/// </summary>
/// <remarks>Value should be between 1 and 30</remarks>
public int TotalBackups { get; set; } = 30;
/// <summary>
/// If Kavita should watch the library folders and process changes
/// </summary>
public bool EnableFolderWatching { get; set; } = true;
}
}