2
0

We happy? We happy. Thanks ReSharper

This commit is contained in:
glax 2023-05-20 01:06:12 +02:00
parent 9d104b25f8
commit 08e0fe7c71
4 changed files with 9 additions and 1 deletions

View File

@ -130,6 +130,7 @@ public static class Tranga_Cli
selection = Console.ReadKey().Key;
taskManager.Shutdown(selection == ConsoleKey.Y);
}else
// ReSharper disable once RedundantArgumentDefaultValue Better readability
taskManager.Shutdown(false);
}
@ -160,7 +161,7 @@ public static class Tranga_Cli
int tIndex = 0;
Console.WriteLine($"Tasks (Running/Total): {taskRunningCount}/{taskCount}");
foreach(TrangaTask trangaTask in tasks)
Console.WriteLine($"{tIndex++:000}: {trangaTask.ToString()}");
Console.WriteLine($"{tIndex++:000}: {trangaTask}");
}
private static void ExecuteTaskNow(TaskManager taskManager)

View File

@ -98,6 +98,7 @@ public abstract class Connector
/// <param name="imageUrls">List of URLs to download Images from</param>
/// <param name="saveArchiveFilePath">Full path to save archive to (without file ending .cbz)</param>
/// <param name="downloadClient">DownloadClient of the connector</param>
/// <param name="comicInfoPath">Path of the generate Chapter ComicInfo.xml, if it was generated</param>
protected static void DownloadChapterImages(string[] imageUrls, string saveArchiveFilePath, DownloadClient downloadClient, string? comicInfoPath = null)
{
//Check if Publication Directory already exists

View File

@ -8,7 +8,9 @@ namespace Tranga;
public readonly struct Publication
{
public string sortName { get; }
// ReSharper disable UnusedAutoPropertyAccessor.Global we need it, trust
[JsonIgnore]public string[,] altTitles { get; }
// ReSharper disable trice MemberCanBePrivate.Global, trust
public string? description { get; }
public string[] tags { get; }
public string? posterUrl { get; }
@ -47,6 +49,7 @@ public readonly struct Publication
//Only for series.json
private struct SeriesInfo
{
// ReSharper disable once UnusedAutoPropertyAccessor.Local we need it, trust
[JsonRequired]public Metadata metadata { get; }
public SeriesInfo(Metadata metadata) => this.metadata = metadata;
}
@ -54,6 +57,7 @@ public readonly struct Publication
//Only for series.json what an abomination, why are all the fields not-null????
private struct Metadata
{
// ReSharper disable UnusedAutoPropertyAccessor.Local we need it, trust
[JsonRequired] public string type { get; }
[JsonRequired] public string publisher { get; }
// ReSharper disable twice IdentifierTypo

View File

@ -7,6 +7,8 @@ namespace Tranga;
/// </summary>
public class TrangaTask
{
// ReSharper disable once CommentTypo ...tell me why!
// ReSharper disable once MemberCanBePrivate.Global I want it thaaat way
public TimeSpan reoccurrence { get; }
public DateTime lastExecuted { get; set; }
public string connectorName { get; }