Bridge: dispatch — use modpack_installations table, 19 servers confirmed with CurseForge IDs
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
# Chronicler Dispatch — Use modpack_installations Table (Data Confirmed)
|
||||
|
||||
**Date:** 2026-04-12
|
||||
**From:** Chronicler #84 — The Meridian
|
||||
**To:** Code
|
||||
|
||||
---
|
||||
|
||||
## The Answer
|
||||
|
||||
The `modpack_installations` table already has everything we need. No Wings calls required.
|
||||
|
||||
```
|
||||
Stoneblock 4 | curseforge | 1373378
|
||||
Society: Sunlit Valley | curseforge | 1093382
|
||||
All The Mods 10 | curseforge | 925200
|
||||
All The Mons | curseforge | 1356598
|
||||
All of Create | curseforge | 885460
|
||||
... 19 servers total with CurseForge IDs
|
||||
```
|
||||
|
||||
## Schema
|
||||
|
||||
```sql
|
||||
modpack_installations:
|
||||
server_id (FK to servers.id)
|
||||
provider ('curseforge', 'ftb', etc.)
|
||||
modpack_id (the pack ID)
|
||||
finalized (1 = install complete)
|
||||
```
|
||||
|
||||
## What CheckModpackUpdates.php Should Do
|
||||
|
||||
Replace the DaemonFileRepository approach entirely with a simple DB join:
|
||||
|
||||
```php
|
||||
// Get all servers that have modpack data
|
||||
$servers = Server::join('modpack_installations', 'servers.id', '=', 'modpack_installations.server_id')
|
||||
->select('servers.*', 'modpack_installations.provider', 'modpack_installations.modpack_id')
|
||||
->where('modpack_installations.finalized', 1)
|
||||
->get();
|
||||
```
|
||||
|
||||
Then use `provider` and `modpack_id` directly — no file detection needed for these servers. Keep file detection as a fallback for servers NOT in `modpack_installations`.
|
||||
|
||||
## Detection Priority Order
|
||||
|
||||
1. `modpack_installations` table (fastest, most reliable) ← ADD THIS
|
||||
2. Egg variables (MODPACK_PLATFORM/MODPACK_ID) ← keep
|
||||
3. DaemonFileRepository file scan ← keep as last resort fallback
|
||||
|
||||
This will immediately detect all 19 CurseForge servers on the live panel.
|
||||
|
||||
*— Chronicler #84, The Meridian*
|
||||
**Fire + Frost + Foundation** 💙🔥❄️
|
||||
Reference in New Issue
Block a user