From 4a5271e2a710ab78c6854e577b98f4b60c8c2d4e Mon Sep 17 00:00:00 2001 From: glax Date: Wed, 13 Sep 2023 23:33:12 +0200 Subject: [PATCH] Added italian tags to series.json --- Tranga/Manga.cs | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/Tranga/Manga.cs b/Tranga/Manga.cs index b37b675..9bde5c6 100644 --- a/Tranga/Manga.cs +++ b/Tranga/Manga.cs @@ -124,14 +124,30 @@ public struct Manga [JsonRequired]public string year { get; } [JsonRequired]public string status { get; } [JsonRequired]public string description_text { get; } - + [JsonIgnore] public static string[] continuing = new[] + { + "ongoing", + "hiatus", + "in corso", + "in pausa" + }; + [JsonIgnore] public static string[] ended = new[] + { + "completed", + "cancelled", + "discontinued", + "finito", + "cancellato", + "droppato" + }; + public Metadata(string name, string year, string status, string description_text) { this.name = name; this.year = year; - if(status.ToLower() == "ongoing" || status.ToLower() == "hiatus") + if(continuing.Contains(status.ToLower())) this.status = "Continuing"; - else if (status.ToLower() == "completed" || status.ToLower() == "cancelled" || status.ToLower() == "discontinued") + else if(ended.Contains(status.ToLower())) this.status = "Ended"; else this.status = status;