Skip to content

Commit accc809

Browse files
authored
Merge pull request #279 from DropSnorz/chore/springboot-34
Update to springboot 3.4
2 parents e835788 + 62a631c commit accc809

19 files changed

+53
-30
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ winget install owlplug
6767

6868
## Plugins discovery
6969

70-
OwlPlug can discover VST2, VST3 and AU Plugins. OwlPlug is compatible with all previously installed plugins as long as they are all in a specific root directory, for example `C:/AudioPlugins`. Additional directories can be configured if your plugin setup is fragmented on the filesystem.
70+
OwlPlug can discover VST2, VST3, AU and LV2 Plugins. OwlPlug is compatible with all previously installed plugins as long as they are all in a specific root directory, for example `C:/AudioPlugins`. Additional directories can be configured if your plugin setup is fragmented on the filesystem.
7171

7272
After downloading Owlplug, you can still organize (add, move, delete, ...) your plugins with a file explorer or with your favorite DAW without breaking anything.
7373

build/package-appimage.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ cp ../owlplug-client/target/owlplug-client-$owlplugversion.jar ./input/owlplug.j
1212

1313
echo "Generating OwlPlug AppImage Install package"
1414

15-
jpackage --input ./input/ --type app-image --name OwlPlug --main-class org.springframework.boot.loader.JarLauncher \
15+
jpackage --input ./input/ --type app-image --name OwlPlug --main-class org.springframework.boot.loader.launch.JarLauncher \
1616
--main-jar owlplug.jar --dest ./output \
1717
--app-version $owlplugversion --vendor OwlPlug
1818

build/package-deb.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ cp ../owlplug-client/target/owlplug-client-$owlplugversion.jar ./input/owlplug.j
1212

1313
echo "Generating OwlPlug DEB Install package"
1414

15-
jpackage --input ./input/ --name OwlPlug --main-class org.springframework.boot.loader.JarLauncher \
15+
jpackage --input ./input/ --name OwlPlug --main-class org.springframework.boot.loader.launch.JarLauncher \
1616
--main-jar owlplug.jar --license-file ./input/LICENSE --dest ./output \
1717
--app-version $owlplugversion --icon ./resources/owlplug.png --vendor OwlPlug \
1818
--linux-package-name owlplug --linux-deb-maintainer [email protected] \

build/package-dmg.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ cp ../owlplug-client/target/owlplug-client-$owlplugversion.jar ./input/owlplug.j
1212

1313
echo "Generating OwlPlug DMG Install package"
1414

15-
jpackage --input ./input/ --name OwlPlug --main-class org.springframework.boot.loader.JarLauncher \
15+
jpackage --input ./input/ --name OwlPlug --main-class org.springframework.boot.loader.launch.JarLauncher \
1616
--main-jar owlplug.jar --license-file ./input/LICENSE --dest ./output \
1717
--app-version $owlplugversion --icon ./resources/owlplug.icns --vendor OwlPlug \
1818
--mac-package-identifier owlplug --mac-package-name OwlPlug

build/package-msi.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ copy "..\owlplug-client\target\owlplug-client-%owlplug-version%.jar" ".\input\ow
1313

1414
echo ** Generating OwlPlug MSI Install package **
1515

16-
jpackage --type msi --input ./input/ --name OwlPlug --main-class org.springframework.boot.loader.JarLauncher ^
16+
jpackage --type msi --input ./input/ --name OwlPlug --main-class org.springframework.boot.loader.launch.JarLauncher ^
1717
--main-jar owlplug.jar --license-file .\input\LICENSE --dest ./output ^
1818
--app-version %owlplug-version% --icon .\resources\owlplug.ico --vendor OwlPlug ^
1919
--win-dir-chooser --win-menu --win-shortcut

owlplug-client/pom.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<modelVersion>4.0.0</modelVersion>
55

66
<properties>
7-
<springboot.version>3.1.2</springboot.version>
7+
<springboot.version>3.4.4</springboot.version>
88
</properties>
99

1010
<parent>
@@ -171,7 +171,6 @@
171171
<dependency>
172172
<groupId>org.apache.httpcomponents.client5</groupId>
173173
<artifactId>httpclient5</artifactId>
174-
<version>5.2</version>
175174
</dependency>
176175

177176
<dependency>

owlplug-client/src/main/java/com/owlplug/core/dao/FileStatDAO.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@
2222
import jakarta.transaction.Transactional;
2323
import java.util.List;
2424
import java.util.Optional;
25+
import org.springframework.data.jpa.repository.Modifying;
26+
import org.springframework.data.jpa.repository.Query;
2527
import org.springframework.data.repository.CrudRepository;
28+
import org.springframework.data.repository.query.Param;
2629

2730
public interface FileStatDAO extends CrudRepository<FileStat, Long> {
2831

@@ -31,6 +34,8 @@ public interface FileStatDAO extends CrudRepository<FileStat, Long> {
3134
List<FileStat> findByParentPathOrderByLengthDesc(String parentPath);
3235

3336
@Transactional
34-
List<FileStat> deleteByPath(String path);
37+
@Modifying
38+
@Query("delete from FileStat f where f.path=:path")
39+
int deleteByPath(@Param("path") String path);
3540

3641
}

owlplug-client/src/main/java/com/owlplug/core/model/FileStat.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
import jakarta.persistence.Table;
3131
import java.util.HashSet;
3232
import java.util.Set;
33+
import org.hibernate.annotations.OnDelete;
34+
import org.hibernate.annotations.OnDeleteAction;
3335

3436
@Entity
3537
@Table(indexes = { @Index(name = "IDX_FILESTAT_ID", columnList = "id"),
@@ -52,6 +54,7 @@ public class FileStat {
5254
private long length;
5355

5456
@OneToMany(mappedBy = "parent", cascade = CascadeType.ALL)
57+
@OnDelete(action = OnDeleteAction.CASCADE)
5558
private Set<FileStat> childs = new HashSet<>();
5659

5760
public Long getId() {

owlplug-client/src/main/java/com/owlplug/core/tasks/AbstractTask.java

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818

1919
package com.owlplug.core.tasks;
2020

21-
import java.util.ArrayList;
21+
import java.time.Duration;
22+
import java.time.Instant;
2223
import javafx.concurrent.Task;
2324
import javafx.concurrent.Worker;
2425
import org.slf4j.Logger;
@@ -30,18 +31,34 @@ public abstract class AbstractTask extends Task<TaskResult> {
3031

3132
private String name = "OwlPlug task";
3233

34+
private Instant taskStarted;
35+
36+
private Instant taskCompleted;
37+
3338
private double maxProgress = 1;
3439
private double committedProgress = 0;
3540

36-
private ArrayList<String> warnings = new ArrayList<>();
37-
3841
public AbstractTask() {
3942
}
4043

4144
public AbstractTask(String name) {
4245
this.name = name;
4346
}
4447

48+
@Override
49+
public TaskResult call() throws Exception {
50+
taskStarted = Instant.now();
51+
TaskResult result = start();
52+
taskCompleted = Instant.now();
53+
54+
Duration elapsed = Duration.between(taskStarted, taskCompleted);
55+
log.info("Task {} completed in {}m{}s.", this.name, elapsed.toMinutes(), elapsed.toSecondsPart());
56+
return result;
57+
}
58+
59+
protected abstract TaskResult start() throws Exception;
60+
61+
4562
protected void commitProgress(double progress) {
4663
committedProgress = committedProgress + progress;
4764
this.updateProgress(committedProgress, getMaxProgress());
@@ -80,14 +97,10 @@ public String getName() {
8097
public void setName(String name) {
8198
this.name = name;
8299
}
83-
84-
protected ArrayList<String> getWarnings() {
85-
return warnings;
86-
}
87100

88101
@Override
89102
protected void updateMessage(String message) {
90-
log.trace("Task status update [" + message + "]");
103+
log.trace("Task" + name + " status update [" + message + "]");
91104
super.updateMessage(message);
92105
}
93106

owlplug-client/src/main/java/com/owlplug/core/tasks/DirectoryRemoveTask.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public DirectoryRemoveTask(PluginDirectory pluginDirectory) {
3333
}
3434

3535
@Override
36-
protected TaskResult call() throws Exception {
36+
protected TaskResult start() throws Exception {
3737

3838
this.updateProgress(0, 1);
3939
this.updateMessage("Deleting directory " + pluginDirectory.getName() + " ...");

0 commit comments

Comments
 (0)