mirror of
https://github.com/BrenBroZAYT/gameyfin.git
synced 2026-06-14 16:20:04 +00:00
Further work and debugging on plugin integration
This commit is contained in:
@@ -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,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
|
||||
|
||||
Reference in New Issue
Block a user