sort resolutions by aspect ratio

This commit is contained in:
darthpaul 2022-10-06 23:31:20 +01:00
parent a83aa1c2e2
commit 3275cf5179
1 changed files with 1 additions and 0 deletions

View File

@ -64,6 +64,7 @@ class ImageQualityManager(
.flatMap { it.qualities } .flatMap { it.qualities }
.sortedByDescending { it.pixels } .sortedByDescending { it.pixels }
.distinctBy { it.getAspectRatio(activity) } .distinctBy { it.getAspectRatio(activity) }
.sortedByDescending { it.getAspectRatio(activity).split(":").firstOrNull()?.toIntOrNull() }
.filter { it.isSupported(fullScreenSize.isSixteenToNine()) } .filter { it.isSupported(fullScreenSize.isSixteenToNine()) }
} }