Fixed Publication.InternalId
This commit is contained in:
parent
01cb74c088
commit
93cf341f2d
@ -37,8 +37,8 @@ public readonly struct Publication
|
|||||||
this.status = status;
|
this.status = status;
|
||||||
this.publicationId = publicationId;
|
this.publicationId = publicationId;
|
||||||
this.folderName = string.Concat(sortName.Split(Path.GetInvalidPathChars().Concat(Path.GetInvalidFileNameChars()).ToArray()));
|
this.folderName = string.Concat(sortName.Split(Path.GetInvalidPathChars().Concat(Path.GetInvalidFileNameChars()).ToArray()));
|
||||||
string onlyLowerAscii = this.sortName.ToLower().Where(Char.IsAscii).ToString()!;
|
string onlyLowerLetters = string.Concat(this.sortName.ToLower().Where(Char.IsLetter));
|
||||||
this.internalId = Convert.ToBase64String(Encoding.ASCII.GetBytes($"{onlyLowerAscii}{this.year}"));
|
this.internalId = Convert.ToBase64String(Encoding.ASCII.GetBytes($"{onlyLowerLetters}{this.year}"));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <returns>Serialized JSON String for series.json</returns>
|
/// <returns>Serialized JSON String for series.json</returns>
|
||||||
|
@ -169,6 +169,8 @@ public class TaskManager
|
|||||||
_chapterCollection.TryAdd((Publication)publication!, new List<Chapter>());
|
_chapterCollection.TryAdd((Publication)publication!, new List<Chapter>());
|
||||||
_allTasks.Add(newTask);
|
_allTasks.Add(newTask);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
logger.WriteLine(this.GetType().ToString(), $"Publication already exists {publication?.internalId}");
|
||||||
}
|
}
|
||||||
logger?.WriteLine(this.GetType().ToString(), $"Added new Task {newTask.ToString()}");
|
logger?.WriteLine(this.GetType().ToString(), $"Added new Task {newTask.ToString()}");
|
||||||
ExportData();
|
ExportData();
|
||||||
|
Loading…
Reference in New Issue
Block a user