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

Merge branch 'master' into prompt-to-skip

This commit is contained in:
viown 2024-10-24 12:34:55 +03:00
commit 459d0d7d9a
27 changed files with 1996 additions and 1324 deletions

View file

@ -1,4 +1,4 @@
import React, { FunctionComponent } from 'react';
import React, { FunctionComponent, useCallback } from 'react';
import datetime from '../../../scripts/datetime';
import globalize from '../../../lib/globalize';
import IconButtonElement from '../../../elements/IconButtonElement';
@ -8,6 +8,7 @@ type AccessScheduleListProps = {
DayOfWeek?: string;
StartHour?: number ;
EndHour?: number;
removeScheduleCallback?: (index: number) => void;
};
function getDisplayTime(hours = 0) {
@ -21,7 +22,10 @@ function getDisplayTime(hours = 0) {
return datetime.getDisplayTime(new Date(2000, 1, 1, hours, minutes, 0, 0));
}
const AccessScheduleList: FunctionComponent<AccessScheduleListProps> = ({ index, DayOfWeek, StartHour, EndHour }: AccessScheduleListProps) => {
const AccessScheduleList: FunctionComponent<AccessScheduleListProps> = ({ index, DayOfWeek, StartHour, EndHour, removeScheduleCallback }: AccessScheduleListProps) => {
const onClick = useCallback(() => {
index !== undefined && removeScheduleCallback !== undefined && removeScheduleCallback(index);
}, [index, removeScheduleCallback]);
return (
<div
className='liSchedule listItem'
@ -43,6 +47,7 @@ const AccessScheduleList: FunctionComponent<AccessScheduleListProps> = ({ index,
title='Delete'
icon='delete'
dataIndex={index}
onClick={onClick}
/>
</div>
);

View file

@ -1,12 +1,16 @@
import React, { FunctionComponent } from 'react';
import React, { FunctionComponent, useCallback } from 'react';
import IconButtonElement from '../../../elements/IconButtonElement';
type IProps = {
tag?: string,
tagType?: string;
removeTagCallback?: (tag: string) => void;
};
const TagList: FunctionComponent<IProps> = ({ tag, tagType }: IProps) => {
const TagList: FunctionComponent<IProps> = ({ tag, tagType, removeTagCallback }: IProps) => {
const onClick = useCallback(() => {
tag !== undefined && removeTagCallback !== undefined && removeTagCallback(tag);
}, [tag, removeTagCallback]);
return (
<div className='paperList'>
<div className='listItem'>
@ -21,6 +25,7 @@ const TagList: FunctionComponent<IProps> = ({ tag, tagType }: IProps) => {
title='Delete'
icon='delete'
dataTag={tag}
onClick={onClick}
/>
</div>
</div>

View file

@ -222,7 +222,7 @@
<div class="checkboxContainer checkboxContainer-withDescription advanced">
<label>
<input type="checkbox" is="emby-checkbox" id="chkPreferNonstandardArtistsTag" />
<span>${PreferNonStandardArtistsTag}</span>
<span>${PreferNonstandardArtistsTag}</span>
</label>
<div class="fieldDescription checkboxFieldDescription">${PreferNonstandardArtistsTagHelp}</div>
</div>

View file

@ -268,11 +268,10 @@
<span>${Reset}</span>
</button>
<button is="emby-button" type="submit" class="raised button-submit block btnSave formDialogFooterItem">
<span>${SaveChanges}</span>
<span>${Save}</span>
</button>
</div>
</div>
</form>
</div>

View file

@ -2651,7 +2651,9 @@ export class PlaybackManager {
}
if (mediaSource.DefaultSubtitleStreamIndex == null || mediaSource.DefaultSubtitleStreamIndex < 0) {
mediaSource.DefaultSubtitleStreamIndex = mediaSource.DefaultSecondarySubtitleStreamIndex;
if (mediaSource.DefaultSecondarySubtitleStreamIndex != null) {
mediaSource.DefaultSubtitleStreamIndex = mediaSource.DefaultSecondarySubtitleStreamIndex;
}
mediaSource.DefaultSecondarySubtitleStreamIndex = -1;
}