Further work and debugging on plugin integration

This commit is contained in:
grimsi
2024-10-11 10:18:48 +02:00
parent bfcd3d83c9
commit cc6056fce8
12 changed files with 158 additions and 78 deletions
@@ -1,35 +1,48 @@
package de.grimsi.gameyfin.plugins.igdb
import de.grimsi.gameyfin.pluginapi.gamemetadata.GameMetadata
import de.grimsi.gameyfin.pluginapi.gamemetadata.GameMetadataPlugin
import de.grimsi.gameyfin.pluginapi.gamemetadata.GameMetadataFetcher
import org.pf4j.Extension
import org.pf4j.Plugin
import org.pf4j.PluginWrapper
import java.time.Instant
@Extension
class IgdbPlugin : GameMetadataPlugin {
override fun getConfig(): Map<String, String> {
TODO("Not yet implemented")
class IgdbPlugin(wrapper: PluginWrapper) : Plugin(wrapper) {
override fun start() {
println("IgdbPlugin.start()")
}
override fun setConfig(config: Map<String, String>) {
TODO("Not yet implemented")
override fun stop() {
println("IgdbPlugin.stop()")
}
override fun fetchMetadata(gameId: String): GameMetadata {
return GameMetadata(
title = "Test Game",
description = "This is a test game",
release = Instant.now(),
userRating = 0,
criticRating = 0,
developedBy = listOf("Test Developer"),
publishedBy = listOf("Test Publisher"),
genres = listOf(),
themes = listOf(),
screenshotUrls = listOf(),
videoUrls = listOf(),
features = listOf(),
perspectives = listOf()
)
@Extension
class IgdbMetadataFetcher : GameMetadataFetcher {
override fun getConfig(): Map<String, String> {
TODO("Not yet implemented")
}
override fun setConfig(config: Map<String, String>) {
TODO("Not yet implemented")
}
override fun fetchMetadata(gameId: String): GameMetadata {
return GameMetadata(
title = "Test Game",
description = "This is a test game",
release = Instant.now(),
userRating = 0,
criticRating = 0,
developedBy = listOf("Test Developer"),
publishedBy = listOf("Test Publisher"),
genres = listOf(),
themes = listOf(),
screenshotUrls = listOf(),
videoUrls = listOf(),
features = listOf(),
perspectives = listOf()
)
}
}
}
+1 -1
View File
@@ -1,5 +1,5 @@
Manifest-Version: 1.0
Plugin-Id: igdb
Plugin-Class: de.grimsi.gameyfin.plugins.igdb.IgdbPlugin
Plugin-Version: 1.0.0
Plugin-Version: 1.0.0-SNAPSHOT
Plugin-Provider: grimsi