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:
parent
d4d84d0a18
commit
37be617523
2 changed files with 7 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue