Skip to content

Commit

Permalink
Stats V3 (#3443)
Browse files Browse the repository at this point in the history
  • Loading branch information
majora2007 authored Dec 7, 2024
1 parent bcfb4a6 commit b24b868
Show file tree
Hide file tree
Showing 13 changed files with 510 additions and 347 deletions.
11 changes: 1 addition & 10 deletions API/Controllers/ServerController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -129,23 +129,14 @@ public async Task<ActionResult> AnalyzeFiles()
return Ok();
}

/// <summary>
/// Returns non-sensitive information about the current system
/// </summary>
/// <returns></returns>
[HttpGet("server-info")]
public async Task<ActionResult<ServerInfoDto>> GetVersion()
{
return Ok(await _statsService.GetServerInfo());
}

/// <summary>
/// Returns non-sensitive information about the current system
/// </summary>
/// <remarks>This is just for the UI and is extremely lightweight</remarks>
/// <returns></returns>
[HttpGet("server-info-slim")]
public async Task<ActionResult<ServerInfoDto>> GetSlimVersion()
public async Task<ActionResult<ServerInfoSlimDto>> GetSlimVersion()
{
return Ok(await _statsService.GetServerInfoSlim());
}
Expand Down
15 changes: 0 additions & 15 deletions API/DTOs/Stats/FileFormatDto.cs

This file was deleted.

184 changes: 0 additions & 184 deletions API/DTOs/Stats/ServerInfoDto.cs

This file was deleted.

39 changes: 39 additions & 0 deletions API/DTOs/Stats/V3/LibraryStatV3.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
using System;
using System.Collections.Generic;
using API.Entities.Enums;

namespace API.DTOs.Stats.V3;

public class LibraryStatV3
{
public bool IncludeInDashboard { get; set; }
public bool IncludeInSearch { get; set; }
public bool UsingFolderWatching { get; set; }
/// <summary>
/// Are any exclude patterns setup
/// </summary>
public bool UsingExcludePatterns { get; set; }
/// <summary>
/// Will this library create collections from ComicInfo
/// </summary>
public bool CreateCollectionsFromMetadata { get; set; }
/// <summary>
/// Will this library create reading lists from ComicInfo
/// </summary>
public bool CreateReadingListsFromMetadata { get; set; }
/// <summary>
/// Type of the Library
/// </summary>
public LibraryType LibraryType { get; set; }
public ICollection<FileTypeGroup> FileTypes { get; set; }
/// <summary>
/// Last time library was fully scanned
/// </summary>
public DateTime LastScanned { get; set; }
/// <summary>
/// Number of folders the library has
/// </summary>
public int NumberOfFolders { get; set; }


}
12 changes: 12 additions & 0 deletions API/DTOs/Stats/V3/RelationshipStatV3.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using API.Entities.Enums;

namespace API.DTOs.Stats.V3;

/// <summary>
/// KavitaStats - Information about Series Relationships
/// </summary>
public class RelationshipStatV3
{
public int Count { get; set; }
public RelationKind Relationship { get; set; }
}
Loading

0 comments on commit b24b868

Please sign in to comment.