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:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user