added endpoint for downloading from extensions

This commit is contained in:
2026-01-01 02:59:34 +01:00
parent ba07011800
commit 58843a8bac
10 changed files with 1028 additions and 52 deletions

View File

@@ -187,8 +187,7 @@ async function loadChapter() {
// Lógica específica para contenido LOCAL
if (provider === 'local') {
const unitIndex = Number(currentChapterId); // En local el ID suele ser el índice
const unit = data.units[unitIndex];
const unit = data.units.find(u => String(u.id) === String(currentChapterId));
if (!unit) {
reader.innerHTML = '<div class="loading-container"><span>Chapter not found (Local)</span></div>';
@@ -201,8 +200,12 @@ async function loadChapter() {
reader.innerHTML = '';
// Setup navegación manual para local (simple index +/- 1)
const unitIndex = data.units.findIndex(
u => String(u.id) === String(currentChapterId)
);
setupLocalNavigation(unitIndex, data.units.length);
if (manifest.type === 'manga') {
currentType = 'manga';
updateSettingsVisibility();