Initial curated chimera source from a8ae5b1db07fb49926c94585e2718e5130330974
This commit is contained in:
commit
c737a37f71
531 files changed
+119270
No files matched your search
@@ -0,0 +1,23 @@
|
||||
'use strict';
|
||||
|
||||
$('btn-rescan-game-sources').addEventListener('click', async () => {
|
||||
const btn = $('btn-rescan-game-sources');
|
||||
btn.disabled = true;
|
||||
const orig = btn.textContent;
|
||||
btn.textContent = 'Scanning…';
|
||||
setStatus('Scanning local game source folders…');
|
||||
try {
|
||||
const { total, added } = await window.pork.scanBackups();
|
||||
await loadGames();
|
||||
await loadDashboard();
|
||||
const msg = added > 0
|
||||
? `Found ${total} game(s) — ${added} new, fetching metadata…`
|
||||
: `Scan complete: ${total} game(s) found, none new`;
|
||||
setStatus(msg, 'ok');
|
||||
} catch (e) {
|
||||
setStatus(e.message, 'error');
|
||||
} finally {
|
||||
btn.disabled = false;
|
||||
btn.textContent = orig;
|
||||
}
|
||||
});
|
||||
Reference in new issue
Block a user