Skip to content

Commit

Permalink
Allow to disable a conversion in json config
Browse files Browse the repository at this point in the history
  • Loading branch information
Rakambda committed Jun 22, 2024
1 parent 7ee383f commit a08490d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/main/java/fr/rakambda/mediaconverter/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ public static void main(String[] args){
tempPaths = new ArrayList<>(Configuration.loadConfiguration(parameters.getConfiguration())
.stream()
.flatMap(config -> config.getConversions().stream())
.filter(Conversion::isEnabled)
.parallel()
.map(conv -> {
try{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ public class Conversion{
private Path temp;
@JsonProperty("deleteInput")
private boolean deleteInput = true;
@JsonProperty("enabled")
private boolean enabled = true;
@JsonProperty("excluded")
@JsonDeserialize(contentUsing = NioPathDeserializer.class)
private List<Path> excluded = new LinkedList<>();
Expand Down

0 comments on commit a08490d

Please sign in to comment.