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

Fix sonarjs prefer-single-boolean-return

This commit is contained in:
Bill Thornton 2022-10-06 01:13:06 -04:00
parent bb86ab7f27
commit b426b6e2bf
18 changed files with 52 additions and 187 deletions

View file

@ -19,11 +19,7 @@ function enableLocalPlaylistManagement(player) {
return false;
}
if (player.isLocalPlayer) {
return true;
}
return false;
return player.isLocalPlayer;
}
function bindToFullscreenChange(player) {
@ -225,11 +221,7 @@ function getParam(name, url) {
}
function isAutomaticPlayer(player) {
if (player.isLocalPlayer) {
return true;
}
return false;
return player.isLocalPlayer;
}
function getAutomaticPlayers(instance, forceLocalPlayer) {
@ -244,10 +236,7 @@ function getAutomaticPlayers(instance, forceLocalPlayer) {
}
function isServerItem(item) {
if (!item.Id) {
return false;
}
return true;
return !!item.Id;
}
function enableIntros(item) {
@ -3007,11 +2996,8 @@ class PlaybackManager {
function enablePlaybackRetryWithTranscoding(streamInfo, errorType, currentlyPreventsVideoStreamCopy, currentlyPreventsAudioStreamCopy) {
// mediadecodeerror, medianotsupported, network, servererror
if (streamInfo.mediaSource.SupportsTranscoding && (!currentlyPreventsVideoStreamCopy || !currentlyPreventsAudioStreamCopy)) {
return true;
}
return false;
return streamInfo.mediaSource.SupportsTranscoding
&& (!currentlyPreventsVideoStreamCopy || !currentlyPreventsAudioStreamCopy);
}
function onPlaybackError(e, error) {