1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

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

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

* Update skipsegment.ts

* Apply Suggestions

Co-authored-by: Bill Thornton <thornbill@users.noreply.github.com>

* Apply Suggestions

Co-authored-by: Bill Thornton <thornbill@users.noreply.github.com>

---------

Co-authored-by: rlauu <46294892+rlauu@users.noreply.github.com>
Co-authored-by: Bill Thornton <thornbill@users.noreply.github.com>
This commit is contained in:
rlauuzo 2024-10-30 18:18:33 +01:00 committed by GitHub
parent 7ccc494a5b
commit 3311a1407f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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) {