Started working on the parser step - still a bit rough in my head.

This commit is contained in:
Joseph Milazzo 2025-05-09 06:35:08 -05:00
parent 4372d09ee4
commit 2e53987dca
7 changed files with 190 additions and 30 deletions

View file

@ -0,0 +1,12 @@
using API.Data.Metadata;
using API.Services.Tasks.Scanner.Parser;
namespace API.DTOs.Internal.Scanner;
#nullable enable
public sealed record ParsedFile
{
public int Pages { get; set; }
public ComicInfo? Metadata { get; set; }
public ParserInfo? ParsedInformation { get; set; }
}

View file

@ -16,7 +16,14 @@ public sealed record ScannedDirectory
public required string DirectoryPath { get => _directoryPath; set => _directoryPath = Parser.NormalizePath(value); }
private string _directoryPath;
public required DateTime LastModifiedUtc { get; set; }
/// <summary>
/// Root where the directory resides
/// </summary>
/// <remarks>Library Root</remarks>
public required string FolderRoot { get => _folderRoot; set => _folderRoot = Parser.NormalizePath(value); }
private string _folderRoot;
public List<ScannedFile> Files { get; set; } = [];
public required DateTime LastModifiedUtc { get; init; }
public List<ScannedFile> Files { get; init; } = [];
}

View file

@ -10,5 +10,6 @@ public sealed record ScannedFile
private string _filePath;
public required DateTime LastModifiedUtc { get; set; }
public required string FolderRoot { get; set; }
public required MangaFormat Format { get; set; }
}

View file

@ -22,4 +22,12 @@ public sealed record ScannerOption
/// Skip LastModified checks
/// </summary>
public bool ForceScan { get; set; }
/// <summary>
/// Allow use of Filename Parsing
/// </summary>
public bool UseFilenameParsing { get; set; }
/// <summary>
/// Allow use of Internal Metadata
/// </summary>
public bool UseInternalMetadataParsing { get; set; }
}