Kavita/API/DTOs/SeriesDetailDto.cs
Joseph Milazzo d291eb809d
Series Detail Refactor (#1118)
* Fixed a bug where reading list and collection's summary wouldn't render newlines

* Moved all the logic in the UI for Series Detail into the backend (messy code). We are averaging 400ms max with much optimizations available. Next step is to refactor out of controller and provide unit tests.

* Unit tests for CleanSpecialTitle

* Laid out foundation for testing major code in SeriesController.

* Refactored code so that read doesn't need to be disabled on page load. SeriesId doesn't need the series to actually load.

* Removed old property from Volume

* Changed tagbadge font size to rem.

* Refactored some methods from SeriesController.cs into SeriesService.cs

* UpdateRating unit tested

* Wrote unit tests for SeriesDetail

* Worked up some code where books are rendered only as volumes. However, looks like I will need to use Chapters to better support series_index as floats.

* Refactored Series Detail to change Volume Name on Book libraries to have book name and series_index.

* Some cleanup on the code

* DeleteMultipleSeries test is hard. Going to skip.

* Removed some debug code and make all tabs Books for Book library Type
2022-02-24 12:23:40 -08:00

29 lines
1.0 KiB
C#

using System.Collections.Generic;
namespace API.DTOs;
/// <summary>
/// This is a special DTO for a UI page in Kavita. This performs sorting and grouping and returns exactly what UI requires for layout.
/// This is subject to change, do not rely on this Data model.
/// </summary>
public class SeriesDetailDto
{
/// <summary>
/// Specials for the Series. These will have their title and range cleaned to remove the special marker and prepare
/// </summary>
public IEnumerable<ChapterDto> Specials { get; set; }
/// <summary>
/// All Chapters, excluding Specials and single chapters (0 chapter) for a volume
/// </summary>
public IEnumerable<ChapterDto> Chapters { get; set; }
/// <summary>
/// Just the Volumes for the Series (Excludes Volume 0)
/// </summary>
public IEnumerable<VolumeDto> Volumes { get; set; }
/// <summary>
/// These are chapters that are in Volume 0 and should be read AFTER the volumes
/// </summary>
public IEnumerable<ChapterDto> StorylineChapters { get; set; }
}