Added internalId to Publication

This commit is contained in:
glax 2023-05-21 16:22:14 +02:00
parent a321ecb1bc
commit 876b1ab78b
2 changed files with 5 additions and 1 deletions

View File

@ -117,6 +117,7 @@ public class MangaDex : Connector
year, year,
originalLanguage, originalLanguage,
status, status,
manga["id"]!.GetValue<string>(),
manga["id"]!.GetValue<string>() manga["id"]!.GetValue<string>()
); );
publications.Add(pub); //Add Publication (Manga) to result publications.Add(pub); //Add Publication (Manga) to result

View File

@ -21,7 +21,9 @@ public readonly struct Publication
public string folderName { get; } public string folderName { get; }
public string downloadUrl { get; } public string downloadUrl { get; }
public Publication(string sortName, string? description, string[,] altTitles, string[] tags, string? posterUrl, string[,]? links, int? year, string? originalLanguage, string status, string downloadUrl) public string internalId { get; }
public Publication(string sortName, string? description, string[,] altTitles, string[] tags, string? posterUrl, string[,]? links, int? year, string? originalLanguage, string status, string downloadUrl, string internalId)
{ {
this.sortName = sortName; this.sortName = sortName;
this.description = description; this.description = description;
@ -34,6 +36,7 @@ public readonly struct Publication
this.status = status; this.status = status;
this.downloadUrl = downloadUrl; this.downloadUrl = downloadUrl;
this.folderName = string.Concat(sortName.Split(Path.GetInvalidPathChars().Concat(Path.GetInvalidFileNameChars()).ToArray())); this.folderName = string.Concat(sortName.Split(Path.GetInvalidPathChars().Concat(Path.GetInvalidFileNameChars()).ToArray()));
this.internalId = internalId;
} }
/// <returns>Serialized JSON String for series.json</returns> /// <returns>Serialized JSON String for series.json</returns>