2
0

Fix chaptermarkers.

Don't create one if Chapter does not have an ID
This commit is contained in:
Glax 2024-11-02 17:44:23 +01:00
parent 5b0624654b
commit 47479f7a0d

View File

@ -121,6 +121,8 @@ public readonly struct Chapter : IComparable
public void CreateChapterMarker() public void CreateChapterMarker()
{ {
if (this.id is null)
return;
string path = Path.Join(TrangaSettings.downloadLocation, parentManga.folderName, $".{id}"); string path = Path.Join(TrangaSettings.downloadLocation, parentManga.folderName, $".{id}");
File.WriteAllText(path, GetArchiveFilePath()); File.WriteAllText(path, GetArchiveFilePath());
File.SetAttributes(path, FileAttributes.Hidden); File.SetAttributes(path, FileAttributes.Hidden);