fixed: recan issues

This commit is contained in:
2025-10-26 19:14:11 +01:00
parent 12688b9770
commit 75aa410f98
14 changed files with 37 additions and 666 deletions

View File

@@ -924,15 +924,28 @@ class AniWorldApp {
async rescanSeries() {
try {
this.showToast('Scanning directory...', 'info');
const response = await this.makeAuthenticatedRequest('/api/anime/rescan', {
method: 'POST'
});
if (!response) return;
const data = await response.json();
// Debug logging
console.log('Rescan response:', data);
console.log('Success value:', data.success, 'Type:', typeof data.success);
if (data.status === 'success') {
this.showToast('Rescan started', 'success');
if (data.success === true) {
const seriesCount = data.series_count || 0;
this.showToast(
`Rescan complete! Found ${seriesCount} series with missing episodes.`,
'success'
);
// Reload the series list to show the updated data
await this.loadSeries();
} else {
this.showToast(`Rescan error: ${data.message}`, 'error');
}