Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/components/playback/skipsegment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -126,7 +127,7 @@ class SkipSegment extends PlaybackSubscriber {
onPromptSkip(e: Event, segment: MediaSegmentDto) {
if (this.player && segment.EndTicks != null
&& segment.EndTicks >= this.playbackManager.currentItem(this.player).RunTimeTicks
&& this.playbackManager.getNextItem()
&& this.playbackManager.getNextItem() && userSettings.enableNextVideoInfoOverlay()
) {
// Don't display button when UpNextDialog is expected.
return;
Expand Down
2 changes: 1 addition & 1 deletion src/controllers/playback/video/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ export default function (view) {
const player = this;
if (mediaSegment && player && mediaSegment.EndTicks != null
&& mediaSegment.EndTicks >= playbackManager.duration(player)
&& playbackManager.getNextItem()
&& playbackManager.getNextItem() && userSettings.enableNextVideoInfoOverlay()
) {
showComingUpNext(player);
}
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/settings/userSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Loading