From 95750f1e96310aa5b949e52d5f91bbcf62aeaa9a Mon Sep 17 00:00:00 2001 From: Arthur Poiret Date: Sun, 18 Aug 2024 17:20:36 +0200 Subject: [PATCH] feat: formats backward compatibility with store spec --- .../explore/model/json/RegistryModelAdapter.java | 2 +- .../explore/model/json/legacy/StoreModelAdapter.java | 10 +++++----- .../src/main/resources/application.properties | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/owlplug-client/src/main/java/com/owlplug/explore/model/json/RegistryModelAdapter.java b/owlplug-client/src/main/java/com/owlplug/explore/model/json/RegistryModelAdapter.java index c5122bab..aec95d51 100644 --- a/owlplug-client/src/main/java/com/owlplug/explore/model/json/RegistryModelAdapter.java +++ b/owlplug-client/src/main/java/com/owlplug/explore/model/json/RegistryModelAdapter.java @@ -116,7 +116,7 @@ public static PackageBundle jsonMapperToEntity(BundleJsonMapper bundleMapper) { formats.replaceAll(e -> e.equals("vst") ? "vst2" : e.toLowerCase()); packageBundle.setFormats(formats); } else { - packageBundle.setFormats(new ArrayList<>(List.of("vst2"))); + packageBundle.setFormats(List.of("vst2")); } return packageBundle; diff --git a/owlplug-client/src/main/java/com/owlplug/explore/model/json/legacy/StoreModelAdapter.java b/owlplug-client/src/main/java/com/owlplug/explore/model/json/legacy/StoreModelAdapter.java index 5af65f50..a8029fb5 100644 --- a/owlplug-client/src/main/java/com/owlplug/explore/model/json/legacy/StoreModelAdapter.java +++ b/owlplug-client/src/main/java/com/owlplug/explore/model/json/legacy/StoreModelAdapter.java @@ -18,7 +18,6 @@ package com.owlplug.explore.model.json.legacy; -import com.owlplug.core.model.PluginFormat; import com.owlplug.core.model.PluginStage; import com.owlplug.core.model.PluginType; import com.owlplug.core.utils.UrlUtils; @@ -28,6 +27,7 @@ import com.owlplug.explore.model.RemoteSource; import com.owlplug.explore.model.json.BundleJsonMapper; import java.util.HashSet; +import java.util.List; public class StoreModelAdapter { @@ -119,13 +119,13 @@ public static PackageBundle jsonMapperToEntity(BundleJsonMapper mapper) { packageBundle.setFileSize(mapper.getFileSize()); if ("vst3".equals(mapper.getFormat())) { - packageBundle.setFormat(PluginFormat.VST3); + packageBundle.setFormats(List.of("vst3")); } else if ("au".equals(mapper.getFormat())) { - packageBundle.setFormat(PluginFormat.AU); + packageBundle.setFormats(List.of("au")); } else if ("lv2".equals(mapper.getFormat())) { - packageBundle.setFormat(PluginFormat.LV2); + packageBundle.setFormats(List.of("lv2")); } else { - packageBundle.setFormat(PluginFormat.VST2); + packageBundle.setFormats(List.of("vst")); } return packageBundle; diff --git a/owlplug-client/src/main/resources/application.properties b/owlplug-client/src/main/resources/application.properties index 10952ed6..1891d970 100644 --- a/owlplug-client/src/main/resources/application.properties +++ b/owlplug-client/src/main/resources/application.properties @@ -36,5 +36,5 @@ spring.main.web-environment=false # Logger # Available levels are: TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF -logging.level.org.hibernate.SQL=DEBUG -logging.level.org.hibernate.type.descriptor.sql.BasicBinder=TRACE +# logging.level.org.hibernate.SQL=DEBUG +# logging.level.org.hibernate.type.descriptor.sql.BasicBinder=TRACE