Mark recovery-exhausted rows unavailable

This commit is contained in:
Fisto
2026-09-18 12:54:11 +02:00
parent faacedd8f5
commit 46e4fc23c0
2 changed files with 22 additions and 5 deletions
+8 -3
View File
@@ -453,9 +453,14 @@ export class MediaService {
await this.engine.previewBatch(scrapeId, cleared.length);
for (const row of cleared) {
const after = store.getMedia(row.id);
if (after?.preview_hash) this.recover.recovered++;
else if (after?.preview_suspect) this.recover.deferred++;
else this.recover.gone++;
if (after?.preview_hash) {
this.recover.recovered++;
} else {
// Refreshed URL plus a fetch still failed: the file is gone. Mark it
// so later recovery runs do not retry it again.
if (after?.preview_suspect) store.markUnavailableAfterRecovery(row.id);
this.recover.gone++;
}
}
}
} finally {