Stats Fix & Library Bulk Actions (#3209)

Co-authored-by: Fesaa <77553571+Fesaa@users.noreply.github.com>
Co-authored-by: Weblate (bot) <hosted@weblate.org>
Co-authored-by: Gregory.Open <gregory.open@proton.me>
Co-authored-by: Mateusz <mateuszvx8.96@gmail.com>
Co-authored-by: majora2007 <kavitareader@gmail.com>
Co-authored-by: 無情天 <kofzhanganguo@126.com>
This commit is contained in:
Joe Milazzo 2024-09-23 08:07:37 -05:00 committed by GitHub
parent 894b49bb76
commit 857e419e4e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
77 changed files with 72523 additions and 30914 deletions

12
API/DTOs/BulkActionDto.cs Normal file
View file

@ -0,0 +1,12 @@
using System.Collections.Generic;
namespace API.DTOs;
public class BulkActionDto
{
public List<int> Ids { get; set; }
/**
* If this is a Scan action, will ignore optimizations
*/
public bool? Force { get; set; }
}

View file

@ -111,7 +111,7 @@ public class ChapterDto : IHasReadTimeEstimate, IHasCoverImage
/// <inheritdoc cref="IHasReadTimeEstimate.MaxHoursToRead"/>
public int MaxHoursToRead { get; set; }
/// <inheritdoc cref="IHasReadTimeEstimate.AvgHoursToRead"/>
public int AvgHoursToRead { get; set; }
public float AvgHoursToRead { get; set; }
/// <summary>
/// Comma-separated link of urls to external services that have some relation to the Chapter
/// </summary>

View file

@ -0,0 +1,14 @@
using System.Collections.Generic;
namespace API.DTOs;
public class CopySettingsFromLibraryDto
{
public int SourceLibraryId { get; set; }
public List<int> TargetLibraryIds { get; set; }
/// <summary>
/// Include copying over the type
/// </summary>
public bool IncludeType { get; set; }
}

View file

@ -16,5 +16,5 @@ public record HourEstimateRangeDto
/// <summary>
/// Estimated average hours to read the selection
/// </summary>
public int AvgHours { get; init; } = 1;
public float AvgHours { get; init; } = 1f;
}

View file

@ -53,7 +53,7 @@ public class SeriesDto : IHasReadTimeEstimate, IHasCoverImage
/// <inheritdoc cref="IHasReadTimeEstimate.MaxHoursToRead"/>
public int MaxHoursToRead { get; set; }
/// <inheritdoc cref="IHasReadTimeEstimate.AvgHoursToRead"/>
public int AvgHoursToRead { get; set; }
public float AvgHoursToRead { get; set; }
/// <summary>
/// The highest level folder for this Series
/// </summary>

View file

@ -8,11 +8,11 @@ public class TopReadDto
/// <summary>
/// Amount of time read on Comic libraries
/// </summary>
public long ComicsTime { get; set; }
public float ComicsTime { get; set; }
/// <summary>
/// Amount of time read on
/// </summary>
public long BooksTime { get; set; }
public long MangaTime { get; set; }
public float BooksTime { get; set; }
public float MangaTime { get; set; }
}

View file

@ -19,8 +19,6 @@ public class UpdateLibraryDto
[Required]
public bool IncludeInDashboard { get; init; }
[Required]
public bool IncludeInRecommended { get; init; }
[Required]
public bool IncludeInSearch { get; init; }
[Required]
public bool ManageCollections { get; init; }

View file

@ -43,7 +43,7 @@ public class VolumeDto : IHasReadTimeEstimate, IHasCoverImage
/// <inheritdoc cref="IHasReadTimeEstimate.MaxHoursToRead"/>
public int MaxHoursToRead { get; set; }
/// <inheritdoc cref="IHasReadTimeEstimate.AvgHoursToRead"/>
public int AvgHoursToRead { get; set; }
public float AvgHoursToRead { get; set; }
public long WordCount { get; set; }
/// <summary>