feat(setup): add unresolved folders GUI for manual series resolution

- Add /setup/unresolved page for manual provider key resolution
- Integrate unresolved check into setup wizard flow
- Auto-redirect to unresolved page if folders need resolution

After initial setup scan, folders that couldn't be auto-resolved
are now tracked and can be resolved manually via the GUI.

Endpoints:
- GET /api/setup/unresolved - list unresolved folders
- POST /api/setup/unresolved/{folder}/resolve - resolve with provider key
- POST /api/setup/unresolved/{folder}/search - re-search for suggestions
- DELETE /api/setup/unresolved/{folder} - delete without adding
This commit is contained in:
2026-06-05 22:06:55 +02:00
parent ebfbec1225
commit 6a402623c4
3 changed files with 741 additions and 5 deletions

View File

@@ -790,17 +790,36 @@
const data = await response.json();
if (response.ok && data.status === 'ok') {
// Redirect to loading page if provided, otherwise go to login
// Redirect to loading page if provided, otherwise check for unresolved folders
if (data.redirect) {
showMessage('Setup saved! Initializing your anime library...', 'success');
setTimeout(() => {
window.location.href = data.redirect;
}, 500);
} else {
showMessage('Setup completed successfully! Redirecting to login...', 'success');
setTimeout(() => {
window.location.href = '/login';
}, 2000);
// Check for unresolved folders before redirecting
showMessage('Setup completed successfully! Checking for unresolved series...', 'success');
setTimeout(async () => {
try {
const token = localStorage.getItem('auth_token');
const res = await fetch('/api/setup/unresolved', {
headers: { 'Authorization': `Bearer ${token}` }
});
if (res.ok) {
const unresolved = await res.json();
if (unresolved && unresolved.length > 0) {
window.location.href = '/setup/unresolved';
} else {
window.location.href = '/login';
}
} else {
window.location.href = '/login';
}
} catch (e) {
console.error('Error checking unresolved folders:', e);
window.location.href = '/login';
}
}, 1000);
}
} else {
const errorMessage = data.detail || data.message || 'Setup failed';