Backport pull request #6258 from jellyfin-web/release-10.10.z

Show Skip Button When 'Next Video Info Overlay' is Disabled

Original-merge: 3311a1407f

Merged-by: thornbill <thornbill@users.noreply.github.com>

Backported-by: Joshua M. Boniface <joshua@boniface.me>
This commit is contained in:
rlauuzo 2024-11-03 10:54:28 -05:00 committed by Joshua M. Boniface
parent e153eeb6e7
commit 4f17bfb5ed
3 changed files with 5 additions and 2 deletions

View File

@ -3,11 +3,12 @@ import { TICKS_PER_MILLISECOND, TICKS_PER_SECOND } from 'constants/time';
import type { MediaSegmentDto } from '@jellyfin/sdk/lib/generated-client/models/media-segment-dto';
import { PlaybackSubscriber } from 'apps/stable/features/playback/utils/playbackSubscriber';
import { isInSegment } from 'apps/stable/features/playback/utils/mediaSegments';
import Events, { type Event } from '../../utils/events';
import Events, { type Event } from 'utils/events';
import { EventType } from 'types/eventType';
import './skipbutton.scss';
import dom from 'scripts/dom';
import globalize from 'lib/globalize';
import * as userSettings from 'scripts/settings/userSettings';
interface ShowOptions {
animate?: boolean;
@ -127,6 +128,7 @@ class SkipSegment extends PlaybackSubscriber {
if (this.player && segment.EndTicks != null
&& segment.EndTicks >= this.playbackManager.currentItem(this.player).RunTimeTicks
&& this.playbackManager.getNextItem()
&& userSettings.enableNextVideoInfoOverlay()
) {
// Don't display button when UpNextDialog is expected.
return;

View File

@ -637,6 +637,7 @@ export default function (view) {
if (mediaSegment && player && mediaSegment.EndTicks != null
&& mediaSegment.EndTicks >= playbackManager.duration(player)
&& playbackManager.getNextItem()
&& userSettings.enableNextVideoInfoOverlay()
) {
showComingUpNext(player);
}

View File

@ -173,7 +173,7 @@ export class UserSettings {
/**
* Get or set 'Next Video Info Overlay' state.
* @param {boolean|undefined} val - Flag to enable 'Next Video Info Overlay' or undefined.
* @param {boolean|undefined} [val] - Flag to enable 'Next Video Info Overlay' or undefined.
* @return {boolean} 'Next Video Info Overlay' state.
*/
enableNextVideoInfoOverlay(val) {