Field folderName in publication

This commit is contained in:
glax 2023-05-18 19:54:40 +02:00
parent 3485eac88c
commit ab34ca2c45
2 changed files with 3 additions and 4 deletions

View File

@ -180,9 +180,7 @@ public class MangaDex : Connector
foreach (JsonNode? image in imageFileNames)
imageUrls.Add($"{baseUrl}/data/{hash}/{image!.GetValue<string>()}");
string seriesFolder = string.Concat(publication.sortName.Split(Path.GetInvalidPathChars()));
DownloadChapter(imageUrls.ToArray(), Path.Join(downloadLocation, seriesFolder, chapter.relativeFilePath));
DownloadChapter(imageUrls.ToArray(), Path.Join(downloadLocation, publication.folderName, chapter.fileName));
}
protected override void DownloadImage(string url, string path)

View File

@ -11,7 +11,7 @@ public struct Publication
public int? year { get; }
public string? originalLanguage { get; }
public string status { get; }
public string folderName { get; }
public Connector connector { get; }
public string downloadUrl { get; }
@ -28,5 +28,6 @@ public struct Publication
this.status = status;
this.connector = connector;
this.downloadUrl = downloadUrl;
this.folderName = string.Concat(sortName.Split(Path.GetInvalidPathChars()));
}
}