Tranga-Website/Website/modules/interfaces/IJob.tsx
glax c1d333e002 Add GetStandbyJobs call and display to footer.
Fix IJob to represent possible return values.
2024-10-20 02:08:22 +02:00

28 lines
875 B
TypeScript

import IMangaConnector from "./IMangaConnector";
import IProgressToken from "./IProgressToken";
import IChapter from "./IChapter";
export default interface IJob{
progressToken: IProgressToken;
recurring: boolean;
recurrenceTime: string;
lastExecution: Date;
nextExecution: Date;
id: string;
jobType: number;
parentJobId: string | null;
mangaConnector: IMangaConnector;
mangaInternalId: string | undefined; //only on DownloadNewChapters
translatedLanguage: string | undefined; //only on DownloadNewChapters
chapter: IChapter | undefined; //only on DownloadChapter
}
export function JobTypeFromNumber(n: number): string {
switch(n) {
case 0: return "Download Chapter";
case 1: return "Download New Chapters";
case 2: return "Update Metadata";
case 3: return "Monitor";
}
return "";
}