added support for Radarr

This commit is contained in:
Marius Nechifor
2024-11-13 22:37:00 +02:00
committed by GitHub
parent 906be45758
commit 513134fd65
29 changed files with 484 additions and 314 deletions

View File

@@ -0,0 +1,9 @@
namespace Domain.Arr.Enums;
public enum InstanceType
{
Sonarr,
Radarr,
Lidarr,
Readarr
}

View File

@@ -0,0 +1,7 @@
namespace Domain.Arr.Queue;
public record QueueListResponse
{
public required int TotalRecords { get; init; }
public required IReadOnlyList<QueueRecord> Records { get; init; }
}

View File

@@ -0,0 +1,14 @@
namespace Domain.Arr.Queue;
public record QueueRecord
{
public int SeriesId { get; init; }
public int MovieId { get; init; }
public required string Title { get; init; }
public string Status { get; init; }
public string TrackedDownloadStatus { get; init; }
public string TrackedDownloadState { get; init; }
public required string DownloadId { get; init; }
public required string Protocol { get; init; }
public required int Id { get; init; }
}

View File

@@ -0,0 +1,8 @@
namespace Domain.Radarr;
public sealed record RadarrCommand
{
public required string Name { get; init; }
public required HashSet<int> MovieIds { get; init; }
}

View File

@@ -1,6 +0,0 @@
namespace Domain.Sonarr.Queue;
public record CustomFormat(
int Id,
string Name
);

View File

@@ -1,6 +0,0 @@
namespace Domain.Sonarr.Queue;
public record Language(
int Id,
string Name
);

View File

@@ -1,10 +0,0 @@
namespace Domain.Sonarr.Queue;
public record QueueListResponse(
int Page,
int PageSize,
string SortKey,
string SortDirection,
int TotalRecords,
IReadOnlyList<Record> Records
);

View File

@@ -1,28 +0,0 @@
namespace Domain.Sonarr.Queue;
public record Record(
int SeriesId,
int EpisodeId,
int SeasonNumber,
IReadOnlyList<Language> Languages,
IReadOnlyList<CustomFormat> CustomFormats,
int CustomFormatScore,
long Size,
string Title,
long Sizeleft,
string Timeleft,
DateTime EstimatedCompletionTime,
DateTime Added,
string Status,
string TrackedDownloadStatus,
string TrackedDownloadState,
IReadOnlyList<StatusMessage> StatusMessages,
string DownloadId,
string Protocol,
string DownloadClient,
bool DownloadClientHasPostImportCategory,
string Indexer,
string OutputPath,
bool EpisodeHasFile,
int Id
);

View File

@@ -1,7 +0,0 @@
namespace Domain.Sonarr.Queue;
public record Revision(
int Version,
int Real,
bool IsRepack
);

View File

@@ -1,6 +0,0 @@
namespace Domain.Sonarr.Queue;
public record StatusMessage(
string Title,
IReadOnlyList<string> Messages
);

View File

@@ -0,0 +1,8 @@
namespace Domain.Sonarr;
public sealed record SonarrCommand
{
public required string Name { get; init; }
public required int SeriesId { get; set; }
}