mirror of
https://github.com/BrenBroZAYT/gameyfin.git
synced 2026-06-13 16:40:01 +00:00
Small refactoring
This commit is contained in:
@@ -13,6 +13,8 @@ dependencies {
|
||||
api("org.pf4j:pf4j:${rootProject.extra["pf4jVersion"]}") {
|
||||
exclude(group = "org.slf4j")
|
||||
}
|
||||
|
||||
api("org.slf4j:slf4j-api:2.0.16")
|
||||
|
||||
implementation(kotlin("stdlib"))
|
||||
|
||||
|
||||
@@ -1,7 +1,18 @@
|
||||
package de.grimsi.gameyfin.pluginapi.core
|
||||
|
||||
interface GameyfinPlugin {
|
||||
fun getConfigMetadata(): List<PluginConfigElement>
|
||||
fun getCurrentConfig(): Map<String, String?>
|
||||
fun loadConfig(config: Map<String, String?>)
|
||||
import org.pf4j.Plugin
|
||||
import org.pf4j.PluginWrapper
|
||||
|
||||
abstract class GameyfinPlugin(wrapper: PluginWrapper) : Plugin(wrapper) {
|
||||
|
||||
abstract val configMetadata: List<PluginConfigElement>
|
||||
protected open var config: Map<String, String?> = emptyMap()
|
||||
|
||||
open fun getCurrentConfig(): Map<String, String?> {
|
||||
return config
|
||||
}
|
||||
|
||||
open fun loadConfig(config: Map<String, String?>) {
|
||||
this.config = config
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user