Create Publication Folder and replace downloaded files if necessary.

This commit is contained in:
glax
2023-05-18 18:43:22 +02:00
parent d191f5dfc7
commit d46b46f8fb
2 changed files with 12 additions and 6 deletions

View File

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