mirror of
https://github.com/RatzzFatzz/MKVAudioSubtitleChanger.git
synced 2026-02-11 02:05:56 +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()) {
|
||||
statistic.changePlanned();
|
||||
|
||||
if (config.isSafeMode()) return;
|
||||
if (config.isSafeMode()) {
|
||||
log.info("Planned changes [{}] for {}", changeLog(fileInfo), fileInfo.getFile().getPath());
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
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 static at.pcgamingfreaks.mkvaudiosubtitlechanger.util.FileInfoTestUtil.AUDIO_GER;
|
||||
import static at.pcgamingfreaks.mkvaudiosubtitlechanger.util.PathUtils.TEST_FILE;
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
class AttributeUpdaterTest {
|
||||
@@ -56,7 +57,7 @@ class AttributeUpdaterTest {
|
||||
}
|
||||
|
||||
private static FileInfo info(AttributeConfig config, TrackAttributes attr) {
|
||||
FileInfo fileInfo = new FileInfo(null);
|
||||
FileInfo fileInfo = new FileInfo(new File(TEST_FILE));
|
||||
fileInfo.setMatchedConfig(config);
|
||||
if(attr != null) fileInfo.getChanges().getDefaultTrack().put(attr, true);
|
||||
return fileInfo;
|
||||
|
||||
Reference in New Issue
Block a user