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

Make 'ask to skip' the default for intro and outro segments

This commit is contained in:
viown 2024-10-28 17:12:07 +03:00
parent d4d84d0a18
commit 37be617523
2 changed files with 7 additions and 3 deletions

View file

@ -8,7 +8,11 @@ const PREFIX = 'segmentTypeAction';
export const getId = (type: MediaSegmentType) => `${PREFIX}__${type}`;
export function getMediaSegmentAction(userSettings: UserSettings, type: MediaSegmentType): MediaSegmentAction | undefined {
export function getMediaSegmentAction(userSettings: UserSettings, type: MediaSegmentType): MediaSegmentAction {
const action = userSettings.get(getId(type), false);
return action ? action as MediaSegmentAction : undefined;
let defaultAction = MediaSegmentAction.None;
if (type === MediaSegmentType.Intro || type === MediaSegmentType.Outro) {
defaultAction = MediaSegmentAction.AskToSkip;
}
return action ? action as MediaSegmentAction : defaultAction;
}