added endpoint for downloading from extensions
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user