Fix file count if no info was found

This commit is contained in:
RatzzFatzz
2025-02-06 00:00:28 +01:00
parent 471255a09b
commit dc770c9325
3 changed files with 12 additions and 6 deletions

View File

@@ -19,7 +19,6 @@ import me.tongfei.progressbar.ProgressBar;
import me.tongfei.progressbar.ProgressBarBuilder;
import me.tongfei.progressbar.ProgressBarStyle;
import net.harawata.appdirs.AppDirsFactory;
import picocli.CommandLine;
import java.io.File;
import java.io.IOException;
@@ -100,6 +99,12 @@ public abstract class AttributeUpdaterKernel {
FileInfoDto fileInfo = new FileInfoDto(file);
List<FileAttribute> attributes = processor.loadAttributes(file);
if (attributes == null || attributes.isEmpty()) {
statistic.total();
statistic.failure();
return;
}
List<FileAttribute> nonForcedTracks = processor.retrieveNonForcedTracks(attributes);
List<FileAttribute> nonCommentaryTracks = processor.retrieveNonCommentaryTracks(attributes);
@@ -122,7 +127,7 @@ public abstract class AttributeUpdaterKernel {
statistic.shouldChange();
commitChange(fileInfoDto);
break;
case UNABLE_TO_APPLY:
case NO_SUITABLE_CONFIG:
statistic.noSuitableConfigFound();
break;
case ALREADY_SUITED: