feat(scripting): config interface

- change onLaunched to onDispose
- refactor JSModule extras
This commit is contained in:
rhunk
2023-10-14 12:14:30 +02:00
parent baf8727912
commit b92589fa07
15 changed files with 303 additions and 71 deletions

View File

@ -14,6 +14,8 @@ import coil.ImageLoader
import coil.decode.VideoFrameDecoder
import coil.disk.DiskCache
import coil.memory.MemoryCache
import com.google.gson.Gson
import com.google.gson.GsonBuilder
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import me.rhunk.snapenhance.bridge.BridgeService
@ -81,6 +83,8 @@ class RemoteSideContext(
.components { add(VideoFrameDecoder.Factory()) }.build()
}
val gson: Gson by lazy { GsonBuilder().setPrettyPrinting().create() }
fun reload() {
log.verbose("Loading RemoteSideContext")
runCatching {