Add Tdarr integration and widget (#1882)

This commit is contained in:
Janik Brüll
2024-04-18 23:01:20 +02:00
committed by GitHub
parent 39f416c6a9
commit 2b92c98975
17 changed files with 1219 additions and 4 deletions

60
src/types/api/tdarr.ts Normal file
View File

@@ -0,0 +1,60 @@
export type TdarrPieSegment = {
name: string;
value: number;
};
export type TdarrStatistics = {
totalFileCount: number;
totalTranscodeCount: number;
totalHealthCheckCount: number;
failedTranscodeCount: number;
failedHealthCheckCount: number;
stagedTranscodeCount: number;
stagedHealthCheckCount: number;
pies: {
libraryName: string;
libraryId: string;
totalFiles: number;
totalTranscodes: number;
savedSpace: number;
totalHealthChecks: number;
transcodeStatus: TdarrPieSegment[];
healthCheckStatus: TdarrPieSegment[];
videoCodecs: TdarrPieSegment[];
videoContainers: TdarrPieSegment[];
videoResolutions: TdarrPieSegment[];
audioCodecs: TdarrPieSegment[];
audioContainers: TdarrPieSegment[];
}[];
};
export type TdarrWorker = {
id: string;
filePath: string;
fps: number;
percentage: number;
ETA: string;
jobType: string;
status: string;
step: string;
originalSize: number;
estimatedSize: number | null;
outputSize: number | null;
};
export type TdarrQueue = {
array: {
id: string;
healthCheck: string;
transcode: string;
filePath: string;
fileSize: number;
container: string;
codec: string;
resolution: string;
type: 'transcode' | 'health check';
}[];
totalCount: number;
startIndex: number;
endIndex: number;
};

View File

@@ -59,7 +59,8 @@ export type IntegrationType =
| 'adGuardHome'
| 'homeAssistant'
| 'openmediavault'
| 'proxmox';
| 'proxmox'
| 'tdarr';
export type AppIntegrationType = {
type: IntegrationType | null;
@@ -105,6 +106,7 @@ export const integrationFieldProperties: {
homeAssistant: ['apiKey'],
openmediavault: ['username', 'password'],
proxmox: ['apiKey'],
tdarr: [],
};
export type IntegrationFieldDefinitionType = {