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

@ -339,11 +339,7 @@ export class BookPlayer {
}
canPlayItem(item) {
if (item.Path && item.Path.endsWith('epub')) {
return true;
}
return false;
return item.Path && item.Path.endsWith('epub');
}
}

View file

@ -356,11 +356,7 @@ export class ComicsPlayer {
}
canPlayItem(item) {
if (item.Path && (item.Path.endsWith('cbz') || item.Path.endsWith('cbr'))) {
return true;
}
return false;
return item.Path && (item.Path.endsWith('cbz') || item.Path.endsWith('cbr'));
}
}

View file

@ -41,13 +41,9 @@ function cancelFadeTimeout() {
}
function supportsFade() {
if (browser.tv) {
// Not working on tizen.
// We could possibly enable on other tv's, but all smart tv browsers tend to be pretty primitive
return false;
}
return true;
// Not working on tizen.
// We could possibly enable on other tv's, but all smart tv browsers tend to be pretty primitive
return !browser.tv;
}
function requireHlsPlayer(callback) {

View file

@ -304,11 +304,7 @@ export class PdfPlayer {
}
canPlayItem(item) {
if (item.Path && item.Path.endsWith('pdf')) {
return true;
}
return false;
return item.Path && item.Path.endsWith('pdf');
}
}