Ignore incorrect scoring images if they make it through the deletion

This commit is contained in:
Nicolas Mowen 2025-12-15 16:27:30 -07:00
parent 603d9f7d27
commit 2d0ad54661

View File

@ -866,6 +866,12 @@ function TrainGrid({
};
})
.filter((data) => {
// Ignore images that don't match the expected format (event-camera-timestamp-state-score.webp)
// Expected format has 5 parts when split by "-", and score should be a valid number
if (data.score === undefined || isNaN(data.score) || !data.name) {
return false;
}
if (!trainFilter) {
return true;
}