fixed: recan issues
This commit is contained in:
@@ -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');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user