From d028531937b102e8203423184ea51e0b8ed2245b Mon Sep 17 00:00:00 2001 From: FireGamer3 Date: Sat, 15 Apr 2023 14:02:01 -0500 Subject: [PATCH] Fix rewind and fast forward buttons not showing on audio books --- src/components/remotecontrol/remotecontrol.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/components/remotecontrol/remotecontrol.js b/src/components/remotecontrol/remotecontrol.js index 26b7220bc..9952286ae 100644 --- a/src/components/remotecontrol/remotecontrol.js +++ b/src/components/remotecontrol/remotecontrol.js @@ -325,10 +325,11 @@ export default function () { if (layoutManager.mobile) { const playingVideo = playbackManager.isPlayingVideo() && item !== null; const playingAudio = !playbackManager.isPlayingVideo() && item !== null; - buttonVisible(context.querySelector('.btnRepeat'), playingAudio); - buttonVisible(context.querySelector('.btnShuffleQueue'), playingAudio); - buttonVisible(context.querySelector('.btnRewind'), playingVideo); - buttonVisible(context.querySelector('.btnFastForward'), playingVideo); + const playingAudioBook = playingAudio && item.Type == 'AudioBook'; + buttonVisible(context.querySelector('.btnRepeat'), playingAudio && !playingAudioBook); + buttonVisible(context.querySelector('.btnShuffleQueue'), playingAudio && !playingAudioBook); + buttonVisible(context.querySelector('.btnRewind'), playingVideo || playingAudioBook); + buttonVisible(context.querySelector('.btnFastForward'), playingVideo || playingAudioBook); buttonVisible(context.querySelector('.nowPlayingSecondaryButtons .btnShuffleQueue'), playingVideo); buttonVisible(context.querySelector('.nowPlayingSecondaryButtons .btnRepeat'), playingVideo); } else {