mirror of
https://github.com/jellyfin/jellyfin-androidtv.git
synced 2026-10-26 16:45:23 +00:00
Clear skip overlay before applying media segments
(cherry picked from commit 46ce0561ae)
This commit is contained in:
1 parent
bb75ad1151
commit
8072861522
2 files changed
+7
-2
No files matched your search
+6
-2
@@ -479,7 +479,7 @@ public class CustomPlaybackOverlayFragment extends Fragment implements LiveTvGui
|
||||
if (binding.skipOverlay.getVisible()) {
|
||||
// Hide without doing anything
|
||||
if (keyCode == KeyEvent.KEYCODE_BACK || keyCode == KeyEvent.KEYCODE_BUTTON_B || keyCode == KeyEvent.KEYCODE_ESCAPE) {
|
||||
binding.skipOverlay.setTargetPositionMs(null);
|
||||
clearSkipOverlay();
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -487,7 +487,7 @@ public class CustomPlaybackOverlayFragment extends Fragment implements LiveTvGui
|
||||
if (keyCode == KeyEvent.KEYCODE_DPAD_CENTER || keyCode == KeyEvent.KEYCODE_ENTER) {
|
||||
playbackControllerContainer.getValue().getPlaybackController().seek(binding.skipOverlay.getTargetPositionMs(), true);
|
||||
leanbackOverlayFragment.setShouldShowOverlay(false);
|
||||
if (binding != null) binding.skipOverlay.setTargetPositionMs(null);
|
||||
if (binding != null) clearSkipOverlay();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -1263,6 +1263,10 @@ public class CustomPlaybackOverlayFragment extends Fragment implements LiveTvGui
|
||||
}
|
||||
}
|
||||
|
||||
public void clearSkipOverlay() {
|
||||
binding.skipOverlay.setTargetPositionMs(null);
|
||||
}
|
||||
|
||||
private void prepareChapterAdapter() {
|
||||
BaseItemDto item = playbackControllerContainer.getValue().getPlaybackController().getCurrentlyPlayingItem();
|
||||
List<ChapterInfo> chapters = item.getChapters();
|
||||
|
||||
@@ -151,6 +151,7 @@ fun PlaybackController.applyMediaSegments(
|
||||
) {
|
||||
val mediaSegmentRepository by fragment.inject<MediaSegmentRepository>()
|
||||
|
||||
fragment?.clearSkipOverlay()
|
||||
fragment.lifecycleScope.launch {
|
||||
val mediaSegments = runCatching {
|
||||
mediaSegmentRepository.getSegmentsForItem(item)
|
||||
|
||||
Reference in new issue
Block a user