mirror of
https://github.com/BrenBroZAYT/gameyfin.git
synced 2026-06-14 08:15:27 +00:00
Small refactoring
This commit is contained in:
@@ -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