diff --git a/src/main/kotlin/net/schowek/nextclouddlna/NextcloudDLNA.kt b/src/main/kotlin/net/schowek/nextclouddlna/NextcloudDLNA.kt index baa144e..0ad6e19 100644 --- a/src/main/kotlin/net/schowek/nextclouddlna/NextcloudDLNA.kt +++ b/src/main/kotlin/net/schowek/nextclouddlna/NextcloudDLNA.kt @@ -7,7 +7,9 @@ import org.springframework.stereotype.Component @Component -class NextcloudDLNA(private val dlnaService: DlnaService) { +class NextcloudDLNA( + private val dlnaService: DlnaService +) { private val upnpService: UpnpService = dlnaService.start() @PreDestroy diff --git a/src/main/kotlin/net/schowek/nextclouddlna/dlna/transport/MyHttpExchangeUpnpStream.kt b/src/main/kotlin/net/schowek/nextclouddlna/dlna/transport/MyHttpExchangeUpnpStream.kt index 81d9f4e..43330a9 100644 --- a/src/main/kotlin/net/schowek/nextclouddlna/dlna/transport/MyHttpExchangeUpnpStream.kt +++ b/src/main/kotlin/net/schowek/nextclouddlna/dlna/transport/MyHttpExchangeUpnpStream.kt @@ -60,7 +60,7 @@ abstract class MyHttpExchangeUpnpStream( logger.debug("Request did not contain entity body") } if (bodyBytes.isNotEmpty()) { - logger.info(" Request body: " + requestMessage.body) + logger.debug(" Request body: " + requestMessage.body) } val responseMessage = process(requestMessage) diff --git a/src/main/kotlin/net/schowek/nextclouddlna/nextcloud/NextcloudConfigDiscovery.kt b/src/main/kotlin/net/schowek/nextclouddlna/nextcloud/NextcloudConfigDiscovery.kt index ac18ee5..17a3a43 100644 --- a/src/main/kotlin/net/schowek/nextclouddlna/nextcloud/NextcloudConfigDiscovery.kt +++ b/src/main/kotlin/net/schowek/nextclouddlna/nextcloud/NextcloudConfigDiscovery.kt @@ -12,7 +12,8 @@ import java.util.Objects.* @Component class NextcloudConfigDiscovery( - @Value("\${nextcloud.filesDir}") val nextcloudDir: String, + @Value("\${nextcloud.filesDir}") + val nextcloudDir: String, val appConfigRepository: AppConfigRepository ) { final var logger = LoggerFactory.getLogger(NextcloudConfigDiscovery::class.java) diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 9945a90..852ab82 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -1,18 +1,17 @@ server: - port: 8080 - interface: eth0 - friendlyName: NC-DLNA! + port: ${NEXTCLOUD_DLNA_SERVER_PORT:8080} + interface: ${NEXTCLOUD_DLNA_INTERFACE:eth0} + friendlyName: ${NEXTCLOUD_DLNA_FRIENDLY_NAME:Nextcloud-DLNA} nextcloud: - filesDir: /path/to/your/nextcloud/dir/ending/with/data + filesDir: ${NEXTCLOUD_DATA_DIR:/path/to/your/nextcloud/dir/ending/with/data} spring: datasource: - url: jdbc:mariadb://localhost:3306/nextcloud - username: nextcloud - password: nextcloud + url: "jdbc:mariadb://${NEXTCLOUD_DB_HOST:localhost}:${NEXTCLOUD_DB_PORT:3306}/${NEXTCLOUD_DB_NAME:nextcloud}" + username: ${NEXTCLOUD_DB_USER:nextcloud} + password: ${NEXTCLOUD_DB_PASS:nextcloud} driver-class-name: org.mariadb.jdbc.Driver jpa: hibernate: ddl-auto: none - diff --git a/src/test/kotlin/net/schowek/nextclouddlna/NextcloudDLNAAppTests.kt b/src/test/kotlin/net/schowek/nextclouddlna/NextcloudDLNAAppTests.kt deleted file mode 100644 index 1889277..0000000 --- a/src/test/kotlin/net/schowek/nextclouddlna/NextcloudDLNAAppTests.kt +++ /dev/null @@ -1,13 +0,0 @@ -package net.schowek.nextclouddlna - -import org.junit.jupiter.api.Test -import org.springframework.boot.test.context.SpringBootTest - -@SpringBootTest -class NextcloudDLNAAppTests { - - @Test - fun contextLoads() { - } - -}