Library Settings for Reading List Creation (#1930)

* Added the code for Library Settings to allow turning off Reading List creation.

* Fixed a typo
This commit is contained in:
Joe Milazzo 2023-04-15 10:42:22 -05:00 committed by GitHub
parent 7f53eadfda
commit 4791da1447
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 34 additions and 3 deletions

View file

@ -338,6 +338,8 @@ public class LibraryController : BaseApiController
library.IncludeInRecommended = dto.IncludeInRecommended;
library.IncludeInSearch = dto.IncludeInSearch;
library.ManageCollections = dto.ManageCollections;
library.ManageReadingLists = dto.ManageReadingLists;
_unitOfWork.LibraryRepository.Update(library);

View file

@ -34,6 +34,10 @@ public class LibraryDto
/// </summary>
public bool ManageCollections { get; set; } = true;
/// <summary>
/// Should this library create and manage reading lists from Metadata
/// </summary>
public bool ManageReadingLists { get; set; } = true;
/// <summary>
/// Include library series in Search
/// </summary>
public bool IncludeInSearch { get; set; } = true;

View file

@ -24,4 +24,5 @@ public class UpdateLibraryDto
public bool IncludeInSearch { get; init; }
[Required]
public bool ManageCollections { get; init; }
public bool ManageReadingLists { get; init; }
}