novel extensions dont appear on manga entry and viceversa
This commit is contained in:
@@ -499,11 +499,18 @@ async function checkLocalLibraryEntry() {
|
||||
|
||||
async function loadAvailableExtensions() {
|
||||
try {
|
||||
const res = await fetch('/api/extensions/book');
|
||||
if (!bookData?.entry_type) return;
|
||||
console.log(bookData.entry_type)
|
||||
|
||||
const type = bookData.entry_type === 'MANGA' ? 'manga' : 'novel';
|
||||
const res = await fetch(`/api/extensions/${type}`);
|
||||
const data = await res.json();
|
||||
|
||||
availableExtensions = data.extensions || [];
|
||||
setupProviderFilter();
|
||||
} catch (err) { console.error(err); }
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
}
|
||||
}
|
||||
|
||||
function setupProviderFilter() {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
const API_BASE = '/api/config';
|
||||
const API_BASE2 = '/api/config';
|
||||
let currentConfig = {};
|
||||
let currentSchema = {};
|
||||
let activeSection = '';
|
||||
@@ -38,7 +38,7 @@ async function loadSettings() {
|
||||
`;
|
||||
|
||||
try {
|
||||
const res = await fetch(API_BASE);
|
||||
const res = await fetch(API_BASE2);
|
||||
if (!res.ok) throw new Error(`HTTP error! status: ${res.status}`);
|
||||
|
||||
const data = await res.json();
|
||||
@@ -172,7 +172,7 @@ async function saveSettings() {
|
||||
});
|
||||
|
||||
try {
|
||||
const res = await fetch(`${API_BASE}/${activeSection}`, {
|
||||
const res = await fetch(`${API_BASE2}/${activeSection}`, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify(updatedData)
|
||||
|
||||
Reference in New Issue
Block a user