Skip to content

Commit

Permalink
Fix bugs on ImageService.kt
Browse files Browse the repository at this point in the history
  • Loading branch information
Ziedelth committed Jan 11, 2024
1 parent c578e10 commit 8f828ac
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/kotlin/fr/shikkanime/services/ImageService.kt
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ object ImageService {
val backgroundsFolder = File(mediaImageFolder, "backgrounds")
require(backgroundsFolder.exists()) { "Background folder not found" }
require(backgroundsFolder.listFiles()!!.isNotEmpty()) { "Backgrounds not found" }
val bannerFile = File(mediaImageFolder, "dark_banner.png")
val bannerFile = File(mediaImageFolder, "banner.png")
require(bannerFile.exists()) { "Banner image not found" }
val fontFile = File(mediaImageFolder, "font.ttf")
require(fontFile.exists()) { "Font not found" }
Expand All @@ -341,9 +341,9 @@ object ImageService {
val bannerScale = 3
val bannerImage = tmpBannerImage.resize(tmpBannerImage.width / bannerScale, tmpBannerImage.height / bannerScale)
val font = Font.createFont(Font.TRUETYPE_FONT, fontFile)
val scale = 1
val scale = 1.0
val animeImage = ImageIO.read(URI(episode.anime.image!!).toURL()).resize((480 / scale).toInt(), (720 / scale).toInt())
val platformImage = ImageIO.read(URI("https://www.shikkanime.fr/assets/img/platforms/${episode.platform.image}").toURL()).resize(32, 32)
val platformImage = ImageIO.read(URI("http://localhost:37100/assets/img/platforms/${episode.platform.image}").toURL()).resize(32, 32)
return Tuple(backgroundImage, bannerImage, font, animeImage, platformImage)
}

Expand Down

0 comments on commit 8f828ac

Please sign in to comment.