Better date, time, & bitrate formatting, other small UI improvements (#1139)

## Description

Use localized date & time formatting such as using 24 hour clock or
Day-Month-Year date formatting. The localization is based on the
device's locale/language setting. Some pages require reloading if you
switch the locale while Wholphin is running.

Format bitrates using SI 1000 magnitudes instead of 1024. File size
still uses 1024 but formats with "MiB"/"GiB" suffixes now. This aligns
with the server web UI and is more in line with standard practices for
display as well.

Fixes the playback overlay layout being messed up by extremely long
episode names.

Finally, adds jumping by letter using keyboard letter keys on grids if
letter jumping is enabled. I doubt many users have a full keyboard
attached to their TV, but this saves me time using the emulator when I
need to repeatedly open the same item for testing.

### Related issues
Fixes #1132

### Testing
Emulator

## Screenshots
N/A

## AI or LLM usage
None
This commit is contained in:
Ray 2026-03-24 17:48:48 -04:00 committed by GitHub
parent f2570d4ab0
commit 8f9b9813b7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 85 additions and 59 deletions

View file

@ -5,13 +5,13 @@ import androidx.compose.runtime.Immutable
import androidx.compose.runtime.Stable
import androidx.compose.ui.text.AnnotatedString
import androidx.compose.ui.text.buildAnnotatedString
import com.github.damontecres.wholphin.ui.DateFormatter
import com.github.damontecres.wholphin.ui.abbreviateNumber
import com.github.damontecres.wholphin.ui.detail.CardGridItem
import com.github.damontecres.wholphin.ui.detail.music.artistsString
import com.github.damontecres.wholphin.ui.detail.series.SeasonEpisodeIds
import com.github.damontecres.wholphin.ui.dot
import com.github.damontecres.wholphin.ui.formatDateTime
import com.github.damontecres.wholphin.ui.getDateFormatter
import com.github.damontecres.wholphin.ui.nav.Destination
import com.github.damontecres.wholphin.ui.playback.playable
import com.github.damontecres.wholphin.ui.roundMinutes
@ -118,7 +118,7 @@ data class BaseItem(
buildList {
if (type == BaseItemKind.EPISODE) {
data.seasonEpisode?.let(::add)
data.premiereDate?.let { add(DateFormatter.format(it)) }
data.premiereDate?.let { add(getDateFormatter().format(it)) }
} else if (type == BaseItemKind.SERIES) {
data.seriesProductionYears?.let(::add)
} else if (type == BaseItemKind.PHOTO) {