mirror of
https://github.com/RatzzFatzz/MKVAudioSubtitleChanger.git
synced 2026-02-11 10:05:58 +01:00
Update dependencies && Fix status reporting if no subs are available for file
This commit is contained in:
33
pom.xml
33
pom.xml
@@ -6,17 +6,18 @@
|
||||
|
||||
<groupId>at.pcgamingfreaks</groupId>
|
||||
<artifactId>MKVAudioSubtitleChanger</artifactId>
|
||||
<version>4.0.2</version>
|
||||
<version>4.0.4</version>
|
||||
|
||||
<properties>
|
||||
<mainClass>at.pcgamingfreaks.mkvaudiosubtitlechanger.Main</mainClass>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
|
||||
<project.maintainer>RatzzFatzz</project.maintainer>
|
||||
<project.maintainer.mail>github.contact@ratzloeffel.de</project.maintainer.mail>
|
||||
<project.description>Command-line utility for batch-managing default audio and subtitle tracks in MKV files.</project.description>
|
||||
|
||||
<java-version>17</java-version>
|
||||
<lombok-version>1.18.36</lombok-version>
|
||||
<lombok-version>1.18.42</lombok-version>
|
||||
</properties>
|
||||
|
||||
<profiles>
|
||||
@@ -110,7 +111,7 @@
|
||||
<plugin>
|
||||
<groupId>org.panteleyev</groupId>
|
||||
<artifactId>jpackage-maven-plugin</artifactId>
|
||||
<version>1.6.5</version>
|
||||
<version>1.7.1</version>
|
||||
<configuration>
|
||||
<name>${project.artifactId}</name>
|
||||
<vendor>RatzzFatzz</vendor>
|
||||
@@ -307,7 +308,7 @@
|
||||
<path>
|
||||
<groupId>info.picocli</groupId>
|
||||
<artifactId>picocli-codegen</artifactId>
|
||||
<version>4.7.6</version>
|
||||
<version>4.7.7</version>
|
||||
</path>
|
||||
</annotationProcessorPaths>
|
||||
</configuration>
|
||||
@@ -341,7 +342,7 @@
|
||||
<dependency>
|
||||
<groupId>info.picocli</groupId>
|
||||
<artifactId>picocli</artifactId>
|
||||
<version>4.7.6</version>
|
||||
<version>4.7.7</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Hibernate Validator -->
|
||||
@@ -357,7 +358,7 @@
|
||||
<dependency>
|
||||
<groupId>jakarta.el</groupId>
|
||||
<artifactId>jakarta.el-api</artifactId>
|
||||
<version>6.0.1</version>
|
||||
<version>6.1.0-M1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -371,7 +372,7 @@
|
||||
<dependency>
|
||||
<groupId>jakarta.validation</groupId>
|
||||
<artifactId>jakarta.validation-api</artifactId>
|
||||
<version>3.0.2</version>
|
||||
<version>3.1.1</version>
|
||||
</dependency>
|
||||
|
||||
<!-- region logging -->
|
||||
@@ -399,26 +400,26 @@
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.dataformat</groupId>
|
||||
<artifactId>jackson-dataformat-yaml</artifactId>
|
||||
<version>2.18.2</version>
|
||||
<version>2.20.0</version>
|
||||
</dependency>
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind -->
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
<version>2.18.2</version>
|
||||
<version>2.20.0</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/commons-cli/commons-cli -->
|
||||
<dependency>
|
||||
<groupId>commons-cli</groupId>
|
||||
<artifactId>commons-cli</artifactId>
|
||||
<version>1.9.0</version>
|
||||
<version>1.10.0</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-lang3 -->
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
<version>3.17.0</version>
|
||||
<version>3.19.0</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/me.tongfei/progressbar -->
|
||||
<dependency>
|
||||
@@ -432,28 +433,28 @@
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-api</artifactId>
|
||||
<version>5.11.4</version>
|
||||
<version>6.0.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-engine -->
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-engine</artifactId>
|
||||
<version>5.11.4</version>
|
||||
<version>6.0.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/org.mockito/mockito-core -->
|
||||
<dependency>
|
||||
<groupId>org.mockito</groupId>
|
||||
<artifactId>mockito-core</artifactId>
|
||||
<version>5.15.2</version>
|
||||
<version>5.20.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-params -->
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-params</artifactId>
|
||||
<version>5.11.4</version>
|
||||
<version>6.0.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -467,7 +468,7 @@
|
||||
<dependency>
|
||||
<groupId>net.harawata</groupId>
|
||||
<artifactId>appdirs</artifactId>
|
||||
<version>1.3.0</version>
|
||||
<version>1.5.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ import java.util.regex.Pattern;
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
public class Config {
|
||||
public class Config implements CommandLine.IVersionProvider {
|
||||
@Getter(AccessLevel.NONE)
|
||||
@Setter(AccessLevel.NONE)
|
||||
private static Config config = null;
|
||||
@@ -151,5 +151,10 @@ public class Config {
|
||||
.add("attributeConfig=" + attributeConfig)
|
||||
.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getVersion() throws Exception {
|
||||
return new String[0];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -100,6 +100,7 @@ public abstract class AttributeUpdaterKernel {
|
||||
List<FileAttribute> attributes = processor.loadAttributes(file);
|
||||
|
||||
if (attributes == null || attributes.isEmpty()) {
|
||||
log.warn("No attributes found for file {}", file);
|
||||
statistic.total();
|
||||
statistic.failure();
|
||||
return;
|
||||
|
||||
@@ -52,7 +52,7 @@ public class FileInfoDto {
|
||||
public FileStatus getStatus() {
|
||||
if (isChangeNecessary()) return FileStatus.CHANGE_NECESSARY;
|
||||
if (isUnableToApplyConfig()) return FileStatus.NO_SUITABLE_CONFIG;
|
||||
if (isAlreadySuitable()) return FileStatus.ALREADY_SUITED;
|
||||
if (isAlreadySuited()) return FileStatus.ALREADY_SUITED;
|
||||
return FileStatus.UNKNOWN;
|
||||
}
|
||||
|
||||
@@ -60,8 +60,9 @@ public class FileInfoDto {
|
||||
return desiredDefaultAudioLane == null && desiredDefaultSubtitleLane == null;
|
||||
}
|
||||
|
||||
private boolean isAlreadySuitable() {
|
||||
return existingDefaultAudioLanes.contains(desiredDefaultAudioLane) && existingDefaultSubtitleLanes.contains(desiredDefaultSubtitleLane);
|
||||
private boolean isAlreadySuited() {
|
||||
return existingDefaultAudioLanes.contains(desiredDefaultAudioLane)
|
||||
&& (desiredDefaultSubtitleLane == null || existingDefaultSubtitleLanes.contains(desiredDefaultSubtitleLane));
|
||||
}
|
||||
|
||||
private boolean isChangeNecessary() {
|
||||
|
||||
Reference in New Issue
Block a user