More appropriate name for chapter filename

This commit is contained in:
glax 2023-05-18 19:51:26 +02:00
parent 943ce98f38
commit 3485eac88c
2 changed files with 5 additions and 5 deletions

View File

@ -8,15 +8,15 @@ public struct Chapter
public string? chapterNumber { get; }
public string url { get; }
public string relativeFilePath { get; }
public string fileName { get; }
public Chapter(Publication publication, string? name, string? volumeNumber, string? chapterNumber, string url, string relativeFilePath)
public Chapter(Publication publication, string? name, string? volumeNumber, string? chapterNumber, string url, string fileName)
{
this.publication = publication;
this.name = name;
this.volumeNumber = volumeNumber;
this.chapterNumber = chapterNumber;
this.url = url;
this.relativeFilePath = relativeFilePath;
this.fileName = fileName;
}
}

View File

@ -152,9 +152,9 @@ public class MangaDex : Connector
: null;
string chapterName = string.Concat((title ?? "").Split(Path.GetInvalidFileNameChars()));
string relativeFilePath = $"{chapterName} - V{volume}C{chapterNum}";
string chapterFileName = $"{chapterName} - V{volume}C{chapterNum}";
chapters.Add(new Chapter(publication, title, volume, chapterNum, chapterId, relativeFilePath));
chapters.Add(new Chapter(publication, title, volume, chapterNum, chapterId, chapterFileName));
}
}