Fix skip button not displaying correctly with OSD (#6583)

This commit is contained in:
rlauuzo
2025-04-03 16:32:50 +02:00
committed by GitHub
parent c3c598e1f4
commit 2413566327

View File

@@ -1,6 +1,7 @@
import { PlaybackManager } from './playbackmanager';
import { TICKS_PER_MILLISECOND, TICKS_PER_SECOND } from 'constants/time';
import type { MediaSegmentDto } from '@jellyfin/sdk/lib/generated-client/models/media-segment-dto';
import type { PlaybackStopInfo } from 'types/playbackStopInfo';
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';
@@ -186,10 +187,12 @@ class SkipSegment extends PlaybackSubscriber {
}
}
onPlaybackStop() {
onPlaybackStop(_e: Event, playbackStopInfo: PlaybackStopInfo) {
this.currentSegment = null;
this.hideSkipButton();
Events.off(document, EventType.SHOW_VIDEO_OSD, this.onOsdChanged);
if (!playbackStopInfo.nextItem) {
Events.off(document, EventType.SHOW_VIDEO_OSD, this.onOsdChanged);
}
}
}