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:
parent
bb86ab7f27
commit
b426b6e2bf
18 changed files with 52 additions and 187 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue