Update item fields queried & expand usage of primary aspect ratio (#1852)

## Description
Slight optimization to remove "child count" for grid pages. Adds back
"primary image aspect ratio" for several queries where its necessary.

Also updates extras cards to use the "primary image aspect ratio"
instead of a hard coded value.

Dev note: some light refactoring is also in this PR including renaming
the item fields lists to better reflect the intended usage in code

### Related issues
Fixes #1843

### Testing
Emulator, I tested many pages and views, but probably need to do "real
world" testing to see if I missed anything

## Screenshots
N/A

## AI or LLM usage
None
This commit is contained in:
Damontecres 2026-08-17 22:54:15 -04:00 • committed by GitHub
parent c4264a3263
commit b064af7c4e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 105 additions and 83 deletions

View file

@ -27,6 +27,7 @@ sealed interface ExtrasItem {
val subtitle: String?
val isPlayed: Boolean
val playedPercentage: Double
val aspectRatio: Float?
/**
* Represents multiple extras of the same type
@ -39,6 +40,7 @@ sealed interface ExtrasItem {
override val title: String,
override val subtitle: String,
override val isPlayed: Boolean,
override val aspectRatio: Float?,
) : ExtrasItem {
override val destination: Destination =
Destination.ItemGrid(
@ -82,6 +84,8 @@ sealed interface ExtrasItem {
get() = item.played
override val playedPercentage
get() = item.data.userData?.playedPercentage ?: 0.0
override val aspectRatio: Float?
get() = item.aspectRatio
}
}