Merge remote-tracking branch 'origin/main'

# Conflicts:
#	src/metadata/anilist.exe
#	src/views/views.routes.ts
This commit is contained in:
2025-12-01 13:02:30 +01:00
7 changed files with 932 additions and 8 deletions

View File

@@ -73,6 +73,36 @@ 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();