finished gallery section

This commit is contained in:
2025-12-01 16:54:11 +01:00
parent cace0119c6
commit 7a7b8dc2f1
13 changed files with 1402 additions and 522 deletions

View File

@@ -55,7 +55,7 @@ function startCppScraper() {
const env = { ...process.env };
env.PATH = `${dllPath};${env.PATH}`;
console.log("⚡ Starting WaifuBoard Scraper Engine (C++)...");
const scraper = spawn(exePath, [], {
@@ -73,39 +73,10 @@ function startCppScraper() {
});
}
function startCppScraper() {
const exePath = path.join(__dirname, 'src', 'metadata', 'anilist.exe');
const dllPath = path.join(__dirname, 'src', 'metadata', 'binaries');
if (!fs.existsSync(exePath)) {
console.error(`❌ C++ Error: Could not find executable at: ${exePath}`);
console.error(" Did you compile it? (g++ src/metadata/anilist.cpp -o src/metadata/anilist.exe ...)");
return;
}
const env = { ...process.env };
env.PATH = `${dllPath};${env.PATH}`;
console.log("⚡ Starting WaifuBoard Scraper Engine (C++)...");
const scraper = spawn(exePath, [], {
stdio: 'inherit',
cwd: __dirname,
env: env
});
scraper.on('error', (err) => {
console.error('❌ Failed to spawn C++ process:', err);
});
scraper.on('close', (code) => {
console.log(`✅ Scraper process finished with code ${code}`);
});
}
const start = async () => {
try {
initDatabase();
initDatabase("anilist");
initDatabase("favorites");
await loadExtensions();
await fastify.listen({ port: 3000, host: '0.0.0.0' });