Update Plugin API (and plugins)

Fix issue with persisting new games
This commit is contained in:
grimsi
2024-12-21 23:43:38 +01:00
parent 890748fb7c
commit eb14007190
14 changed files with 96 additions and 49 deletions
@@ -122,6 +122,7 @@ class IgdbPlugin(wrapper: PluginWrapper) : GameyfinPlugin(wrapper) {
return GameMetadata(
title = game.name,
description = game.summary,
coverUrl = Mapper.cover(game.cover),
release = Instant.ofEpochSecond(game.firstReleaseDate.seconds),
userRating = game.rating.toInt(),
criticRating = game.aggregatedRating.toInt(),
@@ -95,7 +95,11 @@ class Mapper {
}
fun screenshot(screenshot: proto.Screenshot): URL {
return URI(imageBuilder(screenshot.imageId, ImageSize.SCREENSHOT_HUGE, ImageType.PNG)).toURL()
return URI(imageBuilder(screenshot.imageId, ImageSize.FHD, ImageType.PNG)).toURL()
}
fun cover(cover: proto.Cover): URL {
return URI(imageBuilder(cover.imageId, ImageSize.COVER_BIG, ImageType.PNG)).toURL()
}
fun video(video: proto.GameVideo): URL {