diff --git a/README.md b/README.md index 9bcdb83..cc6925a 100644 --- a/README.md +++ b/README.md @@ -19,23 +19,28 @@ Attribute-config must be entered in pairs: `audio:subtitle`; Example: `jpn:eng`. [here](https://github.com/RatzzFatzz/MKVAudioSubtitleChanger/wiki/Attribute-Config). ## Available parameters -```shell - -l,--library Path to library - -a,--attribute-config Attribute config to decide which tracks to choose when - -p,--config-path Path to config file - -m,--mkvtoolnix Path to mkv tool nix installation - -s,--safe-mode Test run (no files will be changes) - -t,--threads Thread count (default: 2) - -i,--include-pattern Include files matching pattern (default: ".*") - -e,--exclude-directories Directories to be excluded, combines with config file - -fk,--forced-keywords Additional keywords to identify forced tracks - -ck,--commentary-keywords Additional keywords to identify commentary tracks - -v,--version Display version - -h,--help "For help this is" - Yoda ``` + -l,--library-path Path to library + -a,--attribute-config Attribute config to decide which tracks to choose when + -p,--config-path Path to config file + -m,--mkvtoolnix Path to mkv tool nix installation + -s,--safe-mode Test run (no files will be changes) + -c,--coherent Try to match all files in dir of depth with the same config + -cf,--force-coherent Force coherent and don't update anything if config fits not whole config (default: false) + -n,--only-new-files Sets filter-date to last successful execution (Overwrites input of filter-date) + -d,--filter-date Only consider files created newer than entered date (format: "dd.MM.yyyy-HH:mm:ss") + -t,--threads Thread count (default: 2) + -i,--include-pattern Include files matching pattern (default: ".*") + -e,--excluded-directories Directories to be excluded, combines with config file + -fk,--forced-keywords Additional keywords to identify forced tracks + -ck,--commentary-keywords Additional keywords to identify commentary tracks + -ps,--preferred-subtitles Additional keywords to prefer specific subtitle tracks + -v,--version Display version + -h,--help "For help this is" - Yoda +``` +If you need more information about how each parameter works, check out [this wiki page](https://github.com/RatzzFatzz/MKVAudioSubtitleChanger/wiki/Parameters). -All parameters can also be defined in a config file. -Please read [this wiki page](https://github.com/RatzzFatzz/MKVAudioSubtitleChanger/wiki/How-to-config-file) for more information. +All parameters can also be defined in a [config file](https://github.com/RatzzFatzz/MKVAudioSubtitleChanger/wiki/How-to-config-file). ## Build requirements - JDK 11 or higher diff --git a/src/main/java/at/pcgamingfreaks/mkvaudiosubtitlechanger/config/ConfigLoader.java b/src/main/java/at/pcgamingfreaks/mkvaudiosubtitlechanger/config/ConfigLoader.java index 176a908..bf48362 100644 --- a/src/main/java/at/pcgamingfreaks/mkvaudiosubtitlechanger/config/ConfigLoader.java +++ b/src/main/java/at/pcgamingfreaks/mkvaudiosubtitlechanger/config/ConfigLoader.java @@ -84,7 +84,7 @@ public class ConfigLoader { if (cmd == null) throw new NullPointerException(); return cmd; } catch (ParseException | NullPointerException e) { - formatter.printHelp(106, "java -jar MKVAudioSubtitlesChanger.jar -l ", + formatter.printHelp(130, "java -jar MKVAudioSubtitlesChanger.jar -l ", "\nParameters:", options, "\nFeature requests and bug reports: https://github.com/RatzzFatzz/MKVAudioSubtitleChanger/issues"); System.exit(1); @@ -94,7 +94,7 @@ public class ConfigLoader { private static void exitIfHelp(CommandLine cmd, Options options, HelpFormatter formatter) { if (cmd.hasOption("help")) { - formatter.printHelp(106, "java -jar MKVAudioSubtitlesChanger.jar -l ", + formatter.printHelp(130, "java -jar MKVAudioSubtitlesChanger.jar -l ", "\nParameters:", options, "\nFeature requests and bug reports: https://github.com/RatzzFatzz/MKVAudioSubtitleChanger/issues"); System.exit(0); diff --git a/src/main/java/at/pcgamingfreaks/mkvaudiosubtitlechanger/impl/FileProcessor.java b/src/main/java/at/pcgamingfreaks/mkvaudiosubtitlechanger/impl/FileProcessor.java index 4364558..6619f59 100644 --- a/src/main/java/at/pcgamingfreaks/mkvaudiosubtitlechanger/impl/FileProcessor.java +++ b/src/main/java/at/pcgamingfreaks/mkvaudiosubtitlechanger/impl/FileProcessor.java @@ -30,9 +30,8 @@ public interface FileProcessor { /** * Populate FileInfoDto with the desired tracks, based on AttributeConfig. * @param info to be populated - * @param nonForcedTracks List of all not forced tracks - * @param nonCommentaryTracks List of all not commentary tracks - * @param configs + * @param nonForcedTracks List of all non-forced tracks + * @param nonCommentaryTracks List of all non-commentary tracks */ void detectDesiredTracks(FileInfoDto info, List nonForcedTracks, List nonCommentaryTracks, AttributeConfig... configs); @@ -45,7 +44,7 @@ public interface FileProcessor { * Update the file. * @param file to be updated * @param fileInfo information to update file - * @throws IOException + * @throws IOException when error occurs accessing file retrieving information * @throws MkvToolNixException when error occurs while sending query to mkvpropedit */ void update(File file, FileInfoDto fileInfo) throws IOException, MkvToolNixException; diff --git a/src/main/java/at/pcgamingfreaks/mkvaudiosubtitlechanger/model/ResultStatistic.java b/src/main/java/at/pcgamingfreaks/mkvaudiosubtitlechanger/model/ResultStatistic.java index 6370aa7..98e4dfa 100644 --- a/src/main/java/at/pcgamingfreaks/mkvaudiosubtitlechanger/model/ResultStatistic.java +++ b/src/main/java/at/pcgamingfreaks/mkvaudiosubtitlechanger/model/ResultStatistic.java @@ -116,7 +116,7 @@ public class ResultStatistic { @Override public String toString() { - String sb = "ResultStatistic[" + "filesTotal=" + filesTotal + + return "ResultStatistic[" + "filesTotal=" + filesTotal + ", excluded=" + excluded + ", shouldChange=" + shouldChange + " (failedChanging=" + failedChanging + @@ -126,6 +126,5 @@ public class ResultStatistic { ", failed=" + failed + ", runtime=" + formatTimer() + ']'; - return sb; } }