mirror of
https://github.com/C9Glax/tranga.git
synced 2025-02-23 15:50:13 +01:00
Re-add forgotten seriesInfo.json to new downloads
This commit is contained in:
parent
8f5dd5aab5
commit
425cf7e0d6
@ -33,6 +33,7 @@ public class DownloadNewChapters : Job
|
|||||||
|
|
||||||
protected override IEnumerable<Job> ExecuteReturnSubTasksInternal()
|
protected override IEnumerable<Job> ExecuteReturnSubTasksInternal()
|
||||||
{
|
{
|
||||||
|
manga.SaveSeriesInfoJson(settings.downloadLocation);
|
||||||
Chapter[] chapters = mangaConnector.GetNewChapters(manga, this.translatedLanguage);
|
Chapter[] chapters = mangaConnector.GetNewChapters(manga, this.translatedLanguage);
|
||||||
this.progressToken.increments = chapters.Length;
|
this.progressToken.increments = chapters.Length;
|
||||||
List<Job> jobs = new();
|
List<Job> jobs = new();
|
||||||
|
@ -105,7 +105,7 @@ public struct Manga
|
|||||||
/// <returns>Serialized JSON String for series.json</returns>
|
/// <returns>Serialized JSON String for series.json</returns>
|
||||||
private string GetSeriesInfoJson()
|
private string GetSeriesInfoJson()
|
||||||
{
|
{
|
||||||
SeriesInfo si = new (new Metadata(this.sortName, this.year.ToString() ?? string.Empty, this.status, this.description ?? ""));
|
SeriesInfo si = new (new Metadata(this));
|
||||||
return System.Text.Json.JsonSerializer.Serialize(si);
|
return System.Text.Json.JsonSerializer.Serialize(si);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -151,6 +151,11 @@ public struct Manga
|
|||||||
"droppato"
|
"droppato"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
public Metadata(Manga manga) : this(manga.sortName, manga.year.ToString() ?? string.Empty, manga.status, manga.description ?? "")
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public Metadata(string name, string year, string status, string description_text)
|
public Metadata(string name, string year, string status, string description_text)
|
||||||
{
|
{
|
||||||
this.name = name;
|
this.name = name;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user