mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge pull request #4822 from Goku-04/patch-2
Return boolean through direct comparison
This commit is contained in:
commit
61a496455d
9 changed files with 12 additions and 11 deletions
|
@ -64,6 +64,7 @@ module.exports = {
|
||||||
'no-throw-literal': ['error'],
|
'no-throw-literal': ['error'],
|
||||||
'no-trailing-spaces': ['error'],
|
'no-trailing-spaces': ['error'],
|
||||||
'no-undef-init': ['error'],
|
'no-undef-init': ['error'],
|
||||||
|
'no-unneeded-ternary': ['error'],
|
||||||
'no-unused-expressions': ['off'],
|
'no-unused-expressions': ['off'],
|
||||||
'@typescript-eslint/no-unused-expressions': ['error', { 'allowShortCircuit': true, 'allowTernary': true, 'allowTaggedTemplates': true }],
|
'@typescript-eslint/no-unused-expressions': ['error', { 'allowShortCircuit': true, 'allowTernary': true, 'allowTaggedTemplates': true }],
|
||||||
'no-unused-private-class-members': ['error'],
|
'no-unused-private-class-members': ['error'],
|
||||||
|
|
|
@ -71,8 +71,8 @@ const GenresSectionContainer: FC<GenresSectionContainerProps> = ({
|
||||||
centerText: true,
|
centerText: true,
|
||||||
cardLayout: false,
|
cardLayout: false,
|
||||||
shape: itemType === BaseItemKind.MusicAlbum ? 'overflowSquare' : 'overflowPortrait',
|
shape: itemType === BaseItemKind.MusicAlbum ? 'overflowSquare' : 'overflowPortrait',
|
||||||
showParentTitle: itemType === BaseItemKind.MusicAlbum ? true : false,
|
showParentTitle: itemType === BaseItemKind.MusicAlbum,
|
||||||
showYear: itemType === BaseItemKind.MusicAlbum ? false : true
|
showYear: itemType !== BaseItemKind.MusicAlbum
|
||||||
}}
|
}}
|
||||||
/>;
|
/>;
|
||||||
};
|
};
|
||||||
|
|
|
@ -291,7 +291,7 @@ function Guide(options) {
|
||||||
showPremiereIndicator: allowIndicators && userSettings.get('guide-indicator-premiere') !== 'false',
|
showPremiereIndicator: allowIndicators && userSettings.get('guide-indicator-premiere') !== 'false',
|
||||||
showNewIndicator: allowIndicators && userSettings.get('guide-indicator-new') !== 'false',
|
showNewIndicator: allowIndicators && userSettings.get('guide-indicator-new') !== 'false',
|
||||||
showRepeatIndicator: allowIndicators && userSettings.get('guide-indicator-repeat') === 'true',
|
showRepeatIndicator: allowIndicators && userSettings.get('guide-indicator-repeat') === 'true',
|
||||||
showEpisodeTitle: layoutManager.tv ? false : true
|
showEpisodeTitle: !layoutManager.tv
|
||||||
};
|
};
|
||||||
|
|
||||||
apiClient.getLiveTvChannels(channelQuery).then(function (channelsResult) {
|
apiClient.getLiveTvChannels(channelQuery).then(function (channelsResult) {
|
||||||
|
|
|
@ -177,7 +177,7 @@ export function getListViewHtml(options) {
|
||||||
const isLargeStyle = options.imageSize === 'large';
|
const isLargeStyle = options.imageSize === 'large';
|
||||||
const enableOverview = options.enableOverview;
|
const enableOverview = options.enableOverview;
|
||||||
|
|
||||||
const clickEntireItem = layoutManager.tv ? true : false;
|
const clickEntireItem = layoutManager.tv;
|
||||||
const outerTagName = clickEntireItem ? 'button' : 'div';
|
const outerTagName = clickEntireItem ? 'button' : 'div';
|
||||||
const enableSideMediaInfo = options.enableSideMediaInfo != null ? options.enableSideMediaInfo : true;
|
const enableSideMediaInfo = options.enableSideMediaInfo != null ? options.enableSideMediaInfo : true;
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,7 @@ function showQualityMenu(player, btn) {
|
||||||
const bitrate = parseInt(id, 10);
|
const bitrate = parseInt(id, 10);
|
||||||
if (bitrate !== selectedBitrate) {
|
if (bitrate !== selectedBitrate) {
|
||||||
playbackManager.setMaxStreamingBitrate({
|
playbackManager.setMaxStreamingBitrate({
|
||||||
enableAutomaticBitrateDetection: bitrate ? false : true,
|
enableAutomaticBitrateDetection: !bitrate,
|
||||||
maxBitrate: bitrate
|
maxBitrate: bitrate
|
||||||
}, player);
|
}, player);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1374,8 +1374,8 @@ function renderChildren(page, item) {
|
||||||
items: result.Items,
|
items: result.Items,
|
||||||
showIndexNumber: false,
|
showIndexNumber: false,
|
||||||
enableOverview: true,
|
enableOverview: true,
|
||||||
enablePlayedButton: layoutManager.mobile ? false : true,
|
enablePlayedButton: !layoutManager.mobile,
|
||||||
infoButton: layoutManager.mobile ? false : true,
|
infoButton: !layoutManager.mobile,
|
||||||
imageSize: 'large',
|
imageSize: 'large',
|
||||||
enableSideMediaInfo: false,
|
enableSideMediaInfo: false,
|
||||||
highlight: false,
|
highlight: false,
|
||||||
|
|
|
@ -21,7 +21,7 @@ function onKeyDown(e) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const enableRefreshHack = browser.tizen || browser.orsay || browser.operaTv || browser.web0s ? true : false;
|
const enableRefreshHack = browser.tizen || browser.orsay || browser.operaTv || browser.web0s;
|
||||||
|
|
||||||
function forceRefresh(loading) {
|
function forceRefresh(loading) {
|
||||||
const elem = this.parentNode;
|
const elem = this.parentNode;
|
||||||
|
|
|
@ -67,7 +67,7 @@ const ScrollButtons: FC<ScrollButtonsProps> = ({ scrollerFactoryRef, scrollState
|
||||||
className='emby-scrollbuttons-button btnPrev'
|
className='emby-scrollbuttons-button btnPrev'
|
||||||
onClick={triggerScrollLeft}
|
onClick={triggerScrollLeft}
|
||||||
icon='chevron_left'
|
icon='chevron_left'
|
||||||
disabled={localeScrollPos > 0 ? false : true}
|
disabled={localeScrollPos <= 0}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<IconButton
|
<IconButton
|
||||||
|
@ -75,7 +75,7 @@ const ScrollButtons: FC<ScrollButtonsProps> = ({ scrollerFactoryRef, scrollState
|
||||||
className='emby-scrollbuttons-button btnNext'
|
className='emby-scrollbuttons-button btnNext'
|
||||||
onClick={triggerScrollRight}
|
onClick={triggerScrollRight}
|
||||||
icon='chevron_right'
|
icon='chevron_right'
|
||||||
disabled={scrollState.scrollWidth > 0 && localeScrollPos + scrollState.scrollSize >= scrollState.scrollWidth ? true : false}
|
disabled={scrollState.scrollWidth > 0 && localeScrollPos + scrollState.scrollSize >= scrollState.scrollWidth}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
|
@ -692,7 +692,7 @@ export default function (options) {
|
||||||
|
|
||||||
profile.TranscodingProfiles = [];
|
profile.TranscodingProfiles = [];
|
||||||
|
|
||||||
const hlsBreakOnNonKeyFrames = browser.iOS || browser.osx || browser.edge || !canPlayNativeHls() ? true : false;
|
const hlsBreakOnNonKeyFrames = browser.iOS || browser.osx || browser.edge || !canPlayNativeHls();
|
||||||
|
|
||||||
if (canPlayHls() && browser.enableHlsAudio !== false) {
|
if (canPlayHls() && browser.enableHlsAudio !== false) {
|
||||||
profile.TranscodingProfiles.push({
|
profile.TranscodingProfiles.push({
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue