mirror of
https://github.com/BrenBroZAYT/gameyfin.git
synced 2026-06-13 16:40:01 +00:00
Sort plugins by priority in UI
This commit is contained in:
+8
-8
@@ -55,6 +55,14 @@ abstract class ConfigurableGameyfinPlugin(wrapper: PluginWrapper) : GameyfinPlug
|
||||
}
|
||||
}
|
||||
|
||||
override fun <T : Serializable> config(key: String): T {
|
||||
val value = optionalConfig<T>(key)
|
||||
if (value == null) {
|
||||
throw PluginConfigError("Required configuration key '$key' is missing or has no value")
|
||||
}
|
||||
return value
|
||||
}
|
||||
|
||||
private fun castConfigValue(meta: ConfigMetadata<*>, value: Any): Any? {
|
||||
val expectedType = meta.type
|
||||
|
||||
@@ -98,14 +106,6 @@ abstract class ConfigurableGameyfinPlugin(wrapper: PluginWrapper) : GameyfinPlug
|
||||
}
|
||||
}
|
||||
|
||||
override fun <T : Serializable> config(key: String): T {
|
||||
val value = optionalConfig<T>(key)
|
||||
if (value == null) {
|
||||
throw PluginConfigError("Required configuration key '$key' is missing or has no value")
|
||||
}
|
||||
return value
|
||||
}
|
||||
|
||||
private fun resolveMetadata(key: String): ConfigMetadata<*> {
|
||||
return configMetadata.find { it.key == key }
|
||||
?: throw PluginConfigError("Unknown configuration key: $key")
|
||||
|
||||
Reference in New Issue
Block a user