mirror of
https://github.com/BrenBroZAYT/gameyfin.git
synced 2026-06-13 16:40:01 +00:00
WIP: First "full-stack" implementation of plugin management
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package de.grimsi.gameyfin.pluginapi.core
|
||||
|
||||
import org.pf4j.Plugin
|
||||
|
||||
abstract class GameyfinPlugin(protected val context: PluginContext) : Plugin()
|
||||
interface GameyfinPlugin {
|
||||
fun getConfigMetadata(): List<PluginConfigElement>
|
||||
fun getCurrentConfig(): Map<String, String?>
|
||||
fun loadConfig(config: Map<String, String?>)
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package de.grimsi.gameyfin.pluginapi.core
|
||||
|
||||
data class PluginConfigElement(
|
||||
val key: String,
|
||||
val name: String,
|
||||
val description: String
|
||||
)
|
||||
@@ -1,9 +0,0 @@
|
||||
package de.grimsi.gameyfin.pluginapi.core
|
||||
|
||||
import org.pf4j.RuntimeMode
|
||||
|
||||
class PluginContext(private val runtimeMode: RuntimeMode) {
|
||||
fun getRuntimeMode(): RuntimeMode {
|
||||
return runtimeMode
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user