Fix trickplay image scaling (#477)

Fix to #467 to scale the tiles by the actual calculated ratio based on
the server's fixed width and our target width instead of using the
general density scaling

I verified this on 1080p & 4k with 4:3, 16:9, & 2.35:1 videos.

Fixes
https://github.com/damontecres/Wholphin/issues/432#issuecomment-3657381461
This commit is contained in:
damontecres 2025-12-15 16:53:06 -05:00 committed by GitHub
parent ebfc00c016
commit d5a55ce4ad
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -84,7 +84,7 @@ fun SeekPreviewImage(
if (previewImageUrl.isNotNullOrBlank()) { if (previewImageUrl.isNotNullOrBlank()) {
val height = 160.dp val height = 160.dp
val width = height * (trickPlayInfo.width.toFloat() / trickPlayInfo.height) val width = height * (trickPlayInfo.width.toFloat() / trickPlayInfo.height)
val scale = LocalDensity.current.density val scale = with(LocalDensity.current) { width.toPx() / trickPlayInfo.width }
val model = val model =
remember(previewImageUrl) { remember(previewImageUrl) {