Fixes single result redirect

This commit is contained in:
Andy Maesen
2023-07-06 02:09:56 +02:00
parent 25f48592c0
commit aa0dc4fa35
3 changed files with 53 additions and 2 deletions

View File

@ -504,8 +504,30 @@ public static class Tranga_Cli
Chapter[] availableChapters = connector.GetChapters(publication, "en");
int cIndex = 0;
Console.WriteLine("Chapters:");
System.Text.StringBuilder sb = new();
foreach(Chapter chapter in availableChapters)
Console.WriteLine($"{cIndex++}: Vol.{chapter.volumeNumber} Ch.{chapter.chapterNumber} - {chapter.name}");
{
sb.Append($"{cIndex++}: ");
if(string.IsNullOrWhiteSpace(chapter.volumeNumber) == false)
{
sb.Append($"Vol.{chapter.volumeNumber} ");
}
if(string.IsNullOrWhiteSpace(chapter.chapterNumber) == false)
{
sb.Append($"Ch.{chapter.chapterNumber} ");
}
if(string.IsNullOrWhiteSpace(chapter.name) == false)
{
sb.Append($" - {chapter.name}");
}
Console.WriteLine(sb.ToString());
sb.Clear();
}
Console.WriteLine("Enter q to abort");
Console.WriteLine($"Select Chapter(s):");