fixes for extension sources & tweaks

This commit is contained in:
2025-11-29 22:11:42 +01:00
parent 655ab9c987
commit 7625c52017
17 changed files with 1103 additions and 463 deletions

View File

@@ -57,9 +57,31 @@ function getExtensionsList() {
return Array.from(extensions.keys());
}
function getAnimeExtensionsMap() {
const animeExts = new Map();
for (const [name, ext] of extensions) {
if (ext.type === 'anime-board') {
animeExts.set(name, ext);
}
}
return animeExts;
}
function getBookExtensionsMap() {
const bookExts = new Map();
for (const [name, ext] of extensions) {
if (ext.type === 'book-board' || ext.type === 'manga-board') {
bookExts.set(name, ext);
}
}
return bookExts;
}
module.exports = {
loadExtensions,
getExtension,
getAllExtensions,
getExtensionsList
getExtensionsList,
getAnimeExtensionsMap,
getBookExtensionsMap
};