Skip to content

Commit 5cf70ea

Browse files
Sync overlay recording state after pressing record button
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent ad46a34 commit 5cf70ea

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

app/src/main/java/org/jellyfin/androidtv/ui/playback/CustomPlaybackOverlayFragmentHelper.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ fun CustomPlaybackOverlayFragment.playChannel(id: UUID) {
7272
}
7373
}.fold(
7474
onSuccess = { channel ->
75-
playbackControllerContainer.playbackController?.setItems(listOf(channel))
75+
playbackControllerContainer.playbackController?.setItems(mutableListOf(channel))
7676
playbackControllerContainer.playbackController?.play(0)
7777
},
7878
onFailure = {

app/src/main/java/org/jellyfin/androidtv/ui/playback/PlaybackController.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1039,6 +1039,11 @@ public void updateTvProgramInfo() {
10391039
final BaseItemDto channel = getCurrentlyPlayingItem();
10401040
if (channel.getType() == BaseItemKind.TV_CHANNEL) {
10411041
PlaybackControllerHelperKt.getLiveTvChannel(this, channel.getId(), updatedChannel -> {
1042+
if (mItems != null && mCurrentIndex >= 0 && mCurrentIndex < mItems.size()) {
1043+
// Keep current playback item in sync so overlay recording state updates immediately.
1044+
mItems.set(mCurrentIndex, updatedChannel);
1045+
}
1046+
10421047
BaseItemDto program = updatedChannel.getCurrentProgram();
10431048
if (program != null) {
10441049
mCurrentProgramEnd = program.getEndDate();

0 commit comments

Comments
 (0)