Several small fixes (#1612)

## Description
- Fixes showing "null" in the subtitle for some tv episodes (usually
daily shows like Jeopardy)
- Partially fix holding back to return to the previous grid position
(still has focus issues)
- Show/hide tabs on the discover page similar to other pages in the app
- Prevent a warning server-side if a negative playback timestamp is sent

### Related issues
N/A

### Testing
Emulator

## Screenshots
N/A

## AI or LLM usage
None
This commit is contained in:
Damontecres 2026-06-22 18:38:19 -04:00 • committed by GitHub
parent 77d7571276
commit c945e1a472
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 44 additions and 18 deletions

View file

@ -21,6 +21,7 @@ import timber.log.Timber
import java.util.Timer
import java.util.TimerTask
import java.util.UUID
import kotlin.time.Duration
import kotlin.time.Duration.Companion.milliseconds
import kotlin.time.Duration.Companion.seconds
@ -84,10 +85,13 @@ class TrackActivityPlaybackListener(
launch("reportPlaybackStopped") {
getState.invoke()?.let { state ->
Timber.v("reportPlaybackStopped for ${state.itemId} at $position")
if (position < Duration.ZERO) {
Timber.w("Negative position when reporting playback stopped: %s", position)
}
api.playStateApi.reportPlaybackStopped(
PlaybackStopInfo(
itemId = state.itemId,
positionTicks = position.inWholeTicks,
positionTicks = position.inWholeTicks.takeIf { it >= 0 },
failed = false,
playSessionId = state.playSessionId,
liveStreamId = state.liveStreamId,