added download monitor
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user