mirror of
https://github.com/RatzzFatzz/MKVAudioSubtitleChanger.git
synced 2026-02-11 02:05:56 +01:00
Improve status detection
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user