mirror of
https://github.com/RatzzFatzz/MKVAudioSubtitleChanger.git
synced 2026-02-10 17:55:57 +01:00
Add logging about planned changes in safe mode
This commit is contained in:
@@ -87,7 +87,10 @@ public abstract class AttributeUpdater {
|
|||||||
if (!fileInfo.getChanges().isEmpty()) {
|
if (!fileInfo.getChanges().isEmpty()) {
|
||||||
statistic.changePlanned();
|
statistic.changePlanned();
|
||||||
|
|
||||||
if (config.isSafeMode()) return;
|
if (config.isSafeMode()) {
|
||||||
|
log.info("Planned changes [{}] for {}", changeLog(fileInfo), fileInfo.getFile().getPath());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
log.info("Committing changes [{}] to {}", changeLog(fileInfo), fileInfo.getFile().getPath());
|
log.info("Committing changes [{}] to {}", changeLog(fileInfo), fileInfo.getFile().getPath());
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import java.util.function.Supplier;
|
|||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
import static at.pcgamingfreaks.mkvaudiosubtitlechanger.util.FileInfoTestUtil.AUDIO_GER;
|
import static at.pcgamingfreaks.mkvaudiosubtitlechanger.util.FileInfoTestUtil.AUDIO_GER;
|
||||||
|
import static at.pcgamingfreaks.mkvaudiosubtitlechanger.util.PathUtils.TEST_FILE;
|
||||||
import static org.junit.jupiter.api.Assertions.*;
|
import static org.junit.jupiter.api.Assertions.*;
|
||||||
|
|
||||||
class AttributeUpdaterTest {
|
class AttributeUpdaterTest {
|
||||||
@@ -56,7 +57,7 @@ class AttributeUpdaterTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static FileInfo info(AttributeConfig config, TrackAttributes attr) {
|
private static FileInfo info(AttributeConfig config, TrackAttributes attr) {
|
||||||
FileInfo fileInfo = new FileInfo(null);
|
FileInfo fileInfo = new FileInfo(new File(TEST_FILE));
|
||||||
fileInfo.setMatchedConfig(config);
|
fileInfo.setMatchedConfig(config);
|
||||||
if(attr != null) fileInfo.getChanges().getDefaultTrack().put(attr, true);
|
if(attr != null) fileInfo.getChanges().getDefaultTrack().put(attr, true);
|
||||||
return fileInfo;
|
return fileInfo;
|
||||||
|
|||||||
Reference in New Issue
Block a user