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

@@ -1779,11 +1779,19 @@ const AnimePlayer = (function() {
btn.disabled = true;
btn.innerHTML = `<div class="spinner" style="width:18px; height:18px; border-width:2px;"></div>`;
// --- CAMBIO AQUÍ: Calcular duración del video actual ---
let totalDuration = 0;
if (els.video && isFinite(els.video.duration) && els.video.duration > 0) {
totalDuration = Math.floor(els.video.duration);
}
// -------------------------------------------------------
let body = {
anilist_id: parseInt(_animeId),
episode_number: parseInt(_currentEpisode),
stream_url: _rawVideoData.url,
headers: _rawVideoData.headers || {},
duration: totalDuration, // <--- ENVIAMOS LA DURACIÓN
chapters: _skipIntervals.map(i => ({
title: i.type === 'op' ? 'Opening' : 'Ending',
start_time: i.startTime,