Release 1.2.3

This commit is contained in:
Simon
2022-10-15 10:49:16 +02:00
committed by GitHub
5 changed files with 16 additions and 10 deletions
+1
View File
@@ -208,6 +208,7 @@
</goals> </goals>
<configuration> <configuration>
<includeStdTypes>true</includeStdTypes> <includeStdTypes>true</includeStdTypes>
<optimizeCodegen>false</optimizeCodegen>
<inputDirectories> <inputDirectories>
<include>${project.basedir}/src/main/resources/proto</include> <include>${project.basedir}/src/main/resources/proto</include>
</inputDirectories> </inputDirectories>
@@ -10,18 +10,16 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary; import org.springframework.context.annotation.Primary;
import org.springframework.context.event.EventListener; import org.springframework.context.event.EventListener;
import org.springframework.core.env.*; import org.springframework.core.env.*;
import org.springframework.util.PropertyPlaceholderHelper;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import javax.annotation.PostConstruct;
import javax.sql.DataSource; import javax.sql.DataSource;
import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.nio.file.Files; import java.nio.file.Files;
import java.nio.file.LinkOption; import java.nio.file.LinkOption;
import java.nio.file.Path; import java.nio.file.Path;
import java.nio.file.Paths; import java.nio.file.Paths;
import java.util.Arrays; import java.util.Arrays;
import java.util.Locale;
import java.util.Properties; import java.util.Properties;
import java.util.stream.StreamSupport; import java.util.stream.StreamSupport;
@@ -48,9 +46,11 @@ public class FilesystemConfig {
*/ */
@EventListener(ApplicationReadyEvent.class) @EventListener(ApplicationReadyEvent.class)
public void hideInternalFolderOnDOS() throws IOException { public void hideInternalFolderOnDOS() throws IOException {
if (!isRunningOnWindows()) return;
Path internalFolder = Paths.get("%s/%s".formatted(firstLibraryPath, INTERNAL_FOLDER_NAME)); Path internalFolder = Paths.get("%s/%s".formatted(firstLibraryPath, INTERNAL_FOLDER_NAME));
if(!Files.exists(internalFolder) || !Files.isDirectory(internalFolder)) return; if (!Files.exists(internalFolder) || !Files.isDirectory(internalFolder)) return;
Files.setAttribute(internalFolder, "dos:hidden", Boolean.TRUE, LinkOption.NOFOLLOW_LINKS); Files.setAttribute(internalFolder, "dos:hidden", Boolean.TRUE, LinkOption.NOFOLLOW_LINKS);
} }
@@ -59,11 +59,11 @@ public class FilesystemConfig {
public void setConfigurableEnvironment(ConfigurableEnvironment env) { public void setConfigurableEnvironment(ConfigurableEnvironment env) {
Properties props = new Properties(); Properties props = new Properties();
if(!StringUtils.hasText(dbPath)) { if (!StringUtils.hasText(dbPath)) {
props.setProperty("gameyfin.db", "%s/%s/db".formatted(firstLibraryPath, INTERNAL_FOLDER_NAME)); props.setProperty("gameyfin.db", "%s/%s/db".formatted(firstLibraryPath, INTERNAL_FOLDER_NAME));
} }
if(!StringUtils.hasText(cachePath)) { if (!StringUtils.hasText(cachePath)) {
props.setProperty("gameyfin.cache", "%s/%s/cache".formatted(firstLibraryPath, INTERNAL_FOLDER_NAME)); props.setProperty("gameyfin.cache", "%s/%s/cache".formatted(firstLibraryPath, INTERNAL_FOLDER_NAME));
} }
@@ -72,6 +72,7 @@ public class FilesystemConfig {
/** /**
* This bean is needed so Spring initializes the data source after we are done messing with the configuration environment * This bean is needed so Spring initializes the data source after we are done messing with the configuration environment
*
* @return DataSource * @return DataSource
*/ */
@ConfigurationProperties(prefix = "spring.datasource") @ConfigurationProperties(prefix = "spring.datasource")
@@ -101,4 +102,8 @@ public class FilesystemConfig {
return props; return props;
} }
private boolean isRunningOnWindows() {
return System.getProperty("os.name").toLowerCase(Locale.ENGLISH).contains("windows");
}
} }
+2 -2
View File
@@ -1,12 +1,12 @@
{ {
"name": "frontend", "name": "frontend",
"version": "1.2.2-SNAPSHOT", "version": "1.2.3-SNAPSHOT",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "frontend", "name": "frontend",
"version": "1.2.2-SNAPSHOT", "version": "1.2.3-SNAPSHOT",
"dependencies": { "dependencies": {
"@angular/animations": "^14.0.0", "@angular/animations": "^14.0.0",
"@angular/cdk": "^14.1.0", "@angular/cdk": "^14.1.0",
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "frontend", "name": "frontend",
"version": "1.2.2-SNAPSHOT", "version": "1.2.3-SNAPSHOT",
"scripts": { "scripts": {
"ng": "ng", "ng": "ng",
"start": "ng serve", "start": "ng serve",
+1 -1
View File
@@ -18,7 +18,7 @@
<parent> <parent>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId> <artifactId>spring-boot-starter-parent</artifactId>
<version>2.7.1</version> <version>2.7.4</version>
<relativePath /> <!-- lookup parent from repository --> <relativePath /> <!-- lookup parent from repository -->
</parent> </parent>