Improve status detection

This commit is contained in:
RatzzFatzz
2025-12-18 21:14:15 +01:00
parent 15128583df
commit 5f2248653b
7 changed files with 71 additions and 54 deletions

View File

@@ -30,7 +30,7 @@ public abstract class AttributeUpdater {
public AttributeUpdater(InputConfig config, FileProcessor fileProcessor) {
this.config = config;
this.fileProcessor = fileProcessor;
this.attributeChangeProcessor = new AttributeChangeProcessor(config.getPreferredSubtitles().toArray(new String[0]), config.getForcedKeywords(), config.getCommentaryKeywords(), config.getHearingImpaired());
this.attributeChangeProcessor = attributeChangeProcessor;
this.executor = Executors.newFixedThreadPool(config.getThreads());
}

View File

@@ -14,8 +14,8 @@ import java.util.Set;
@Slf4j
public class CoherentAttributeUpdater extends SingleFileAttributeUpdater {
public CoherentAttributeUpdater(InputConfig config, FileProcessor processor) {
super(config, processor);
public CoherentAttributeUpdater(InputConfig config, FileProcessor processor, AttributeChangeProcessor attributeChangeProcessor) {
super(config, processor, attributeChangeProcessor);
}
@Override

View File

@@ -11,8 +11,8 @@ import java.util.List;
@Slf4j
public class SingleFileAttributeUpdater extends AttributeUpdater {
public SingleFileAttributeUpdater(InputConfig config, FileProcessor processor) {
super(config, processor);
public SingleFileAttributeUpdater(InputConfig config, FileProcessor processor, AttributeChangeProcessor attributeChangeProcessor) {
super(config, processor, attributeChangeProcessor);
}
@Override

View File

@@ -16,10 +16,6 @@ public class ResultStatistic {
private int excluded = 0;
private int unknownFailed = 0;
private int noSuitableConfigFound = 0;
private int alreadyFits = 0;
private int failed = 0;
private long startTime = 0;
private long runtime = 0;
@@ -35,11 +31,7 @@ public class ResultStatistic {
}
public int total() {
return changePlanned + noSuitableConfigFound + alreadyFits + failed;
}
public void increaseExcludedBy(int amount) {
excluded += amount;
return changePlanned + unchanged + excluded + unknownFailed;
}
public synchronized void changePlanned() {