added download monitor

This commit is contained in:
2026-01-06 19:26:06 +01:00
parent ba05e08e71
commit 8296e8d7da
12 changed files with 616 additions and 30 deletions

View File

@@ -28,6 +28,7 @@ type DownloadAnimeBody =
language: string;
url: string;
}[];
duration?: number;
chapters?: {
title: string;
start_time: number;
@@ -38,6 +39,7 @@ type DownloadAnimeBody =
anilist_id: number;
episode_number: number;
stream_url: string;
duration?: number;
is_master: true;
variant: {
resolution: string;
@@ -256,6 +258,7 @@ export async function downloadAnime(request: FastifyRequest<{ Body: DownloadAnim
anilist_id,
episode_number,
stream_url,
duration,
is_master,
subtitles,
chapters
@@ -283,7 +286,8 @@ export async function downloadAnime(request: FastifyRequest<{ Body: DownloadAnim
episodeNumber: episode_number,
streamUrl: proxyUrl,
subtitles: proxiedSubs,
chapters
chapters,
totalDuration: duration
};
if (is_master === true) {