All our improvements were only in the test endpoints, not in the production search flow:
| Feature | Test Endpoint | Production | Status Before Fix |
|---|---|---|---|
| Alternative names matching | ✅ | ❌ | Not used |
| Steam Store API descriptions | ✅ | ❌ | Not used |
| FitGirl "Game Description" extraction | ✅ | ❌ | Not used |
| Enhanced scoring algorithm | ✅ | ❌ | Not used |
The production code in GamesService.searchDownloadCandidates() was calling:
const result = await agent.search(game.name); // Basic searchInstead of:
const result = await agent.searchEnhanced(game.name, { // Enhanced search
igdbGame: game,
});Updated searchDownloadCandidates method:
// Before: Basic search
const result = await agent.search(game.name);
// After: Enhanced search with full IGDB data
const result = await agent.searchEnhanced(game.name, {
igdbGame: game,
});Added missing fields to getGameById:
fields alternative_names.id, alternative_names.name, alternative_names.comment;
fields websites.id, websites.url, websites.category;Added missing fields to getGamesByIds:
fields alternative_names.id, alternative_names.name, alternative_names.comment;
fields websites.id, websites.url, websites.category;curl "http://localhost:3000/api/v1/games/119171/candidates"Result:
[{
"title": "Baldur's Gate 3: Digital Deluxe Edition – v4.1.1.6758295...",
"matchScore": 86,
"matchReasons": [
"matches alternative title", // <-- Using alternative names!
"all main keywords present",
"sequel number matches"
]
}]Before Fix: ❌ Not found
After Fix: ✅ Found with 86/100 score
curl "http://localhost:3000/api/v1/games/134581/candidates"Result:
[{
"title": "Marvel's Spider-Man: Miles Morales – v1.1116.0.0 + DLC + Bonus OST",
"matchScore": 100,
"matchReasons": [
"exact name match",
"exact phrase in title",
"matches alternative title", // <-- Using alternative names!
"strong title match",
"all main keywords present"
]
}]Before Fix: ❌ Not found (45/100 in tests)
After Fix: ✅ Perfect 100/100 match
curl "http://localhost:3000/api/v1/games/119133/candidates"Result:
[{
"title": "ELDEN RING: Shadow of the Erdtree Deluxe Edition...",
"matchScore": 88
}, {
"title": "ELDEN RING NIGHTREIGN: Deluxe Edition...",
"matchScore": 85
}]Before Fix:
After Fix: ✅ Enhanced matching with description comparison
Games with different naming conventions now match:
- "Baldur's Gate III" ↔ "Baldur's Gate 3"
- "Marvel's Spider-Man" ↔ "Spiderman"
Full game descriptions from Steam API (not truncated HTML):
- Better description similarity scoring
- "strong Steam description match" bonus (+40 points)
Extracts actual game description from FitGirl pages:
- Looks for "Game Description" div
- Avoids repack metadata (file sizes, download links)
All scoring improvements now active:
- Unicode apostrophe handling (U+0027, U+2019)
- Special character normalization (ö→o, ä→a, etc.)
- Version/edition suffix removal
- Word match ratio bonuses
| Metric | Before | After |
|---|---|---|
| Baldur's Gate 3 | ❌ Not found | ✅ 86/100 |
| Spider-Man Miles Morales | ❌ 45/100 | ✅ 100/100 |
| Elden Ring | ✅ Enhanced | |
| Alternative names used | ❌ No | ✅ Yes |
| Steam descriptions | ❌ No | ✅ Yes |
All these endpoints now use the enhanced search:
GET /api/v1/games/:igdbId/candidates- Search download candidatesPOST /api/v1/games/check- Check monitored games (periodic)
✅ All changes are backward compatible:
- Response format unchanged
- Existing functionality preserved
- Only adds new fields (alternativeNames, steamAppId)
- Enhanced matching is automatic
Production logs now show:
[GamesService] Game has 6 alternative names, 14 websites
[FitGirl] Using alternative name for search: "Baldur's Gate 3"
[FitGirl] ✓ Using Steam description for matching (2730 chars)
[Match] Checking alt: "Baldur's Gate 3" -> clean: "baldurs gate 3"
[Match] ✓ Title "Baldur's Gate 3" matches alternative name