mirror of
https://github.com/BrenBroZAYT/gameyfin.git
synced 2026-06-15 16:20:03 +00:00
Refactor GameyfinPlugin and ConfigurableGameyfinPlugin to fix SLF4J issue
This commit is contained in:
@@ -8,8 +8,16 @@ plugins {
|
||||
dependencies {
|
||||
ksp("care.better.pf4j:pf4j-kotlin-symbol-processing:${rootProject.extra["pf4jKspVersion"]}")
|
||||
|
||||
implementation("io.ktor:ktor-client-core:${ktor_version}")
|
||||
implementation("io.ktor:ktor-client-cio:${ktor_version}")
|
||||
implementation("io.ktor:ktor-client-content-negotiation:${ktor_version}")
|
||||
implementation("io.ktor:ktor-serialization-kotlinx-json:${ktor_version}")
|
||||
implementation("io.ktor:ktor-client-core:${ktor_version}") {
|
||||
exclude(group = "org.slf4j", module = "slf4j-api")
|
||||
}
|
||||
implementation("io.ktor:ktor-client-cio:${ktor_version}") {
|
||||
exclude(group = "org.slf4j", module = "slf4j-api")
|
||||
}
|
||||
implementation("io.ktor:ktor-client-content-negotiation:${ktor_version}") {
|
||||
exclude(group = "org.slf4j", module = "slf4j-api")
|
||||
}
|
||||
implementation("io.ktor:ktor-serialization-kotlinx-json:${ktor_version}") {
|
||||
exclude(group = "org.slf4j", module = "slf4j-api")
|
||||
}
|
||||
}
|
||||
+2
-8
@@ -1,7 +1,6 @@
|
||||
package de.grimsi.gameyfin.plugins.steamgriddb
|
||||
|
||||
import de.grimsi.gameyfin.pluginapi.core.Configurable
|
||||
import de.grimsi.gameyfin.pluginapi.core.GameyfinPlugin
|
||||
import de.grimsi.gameyfin.pluginapi.core.ConfigurableGameyfinPlugin
|
||||
import de.grimsi.gameyfin.pluginapi.core.PluginConfigElement
|
||||
import de.grimsi.gameyfin.pluginapi.core.PluginConfigError
|
||||
import de.grimsi.gameyfin.pluginapi.gamemetadata.GameMetadata
|
||||
@@ -12,18 +11,14 @@ import de.grimsi.gameyfin.plugins.steamgriddb.dto.SteamGridDbGrid
|
||||
import kotlinx.coroutines.runBlocking
|
||||
import org.pf4j.Extension
|
||||
import org.pf4j.PluginWrapper
|
||||
import org.slf4j.Logger
|
||||
import org.slf4j.LoggerFactory
|
||||
import java.net.URI
|
||||
|
||||
class SteamGridDbPlugin(wrapper: PluginWrapper) : GameyfinPlugin(wrapper), Configurable {
|
||||
class SteamGridDbPlugin(wrapper: PluginWrapper) : ConfigurableGameyfinPlugin(wrapper) {
|
||||
|
||||
companion object {
|
||||
private var client: SteamGridDbApiClient? = null
|
||||
}
|
||||
|
||||
val log: Logger = LoggerFactory.getLogger(javaClass)
|
||||
|
||||
override val configMetadata: List<PluginConfigElement> = listOf(
|
||||
PluginConfigElement(
|
||||
key = "apiKey",
|
||||
@@ -32,7 +27,6 @@ class SteamGridDbPlugin(wrapper: PluginWrapper) : GameyfinPlugin(wrapper), Confi
|
||||
isSecret = true
|
||||
)
|
||||
)
|
||||
override var config: Map<String, String?> = emptyMap()
|
||||
|
||||
override fun validateConfig(config: Map<String, String?>): Boolean {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user