mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Enable eslint sonar prefer-object-literal
This commit is contained in:
parent
9d8f9c806c
commit
e0013915fd
6 changed files with 26 additions and 31 deletions
|
@ -75,8 +75,7 @@ module.exports = {
|
||||||
|
|
||||||
'sonarjs/cognitive-complexity': ['warn'],
|
'sonarjs/cognitive-complexity': ['warn'],
|
||||||
// TODO: Enable the following rules and fix issues
|
// TODO: Enable the following rules and fix issues
|
||||||
'sonarjs/no-duplicate-string': ['off'],
|
'sonarjs/no-duplicate-string': ['off']
|
||||||
'sonarjs/prefer-object-literal': ['off']
|
|
||||||
},
|
},
|
||||||
settings: {
|
settings: {
|
||||||
react: {
|
react: {
|
||||||
|
|
|
@ -26,11 +26,7 @@ import template from './imageeditor.template.html';
|
||||||
let hasChanges = false;
|
let hasChanges = false;
|
||||||
|
|
||||||
function getBaseRemoteOptions() {
|
function getBaseRemoteOptions() {
|
||||||
const options = {};
|
return { itemId: currentItem.Id };
|
||||||
|
|
||||||
options.itemId = currentItem.Id;
|
|
||||||
|
|
||||||
return options;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function reload(page, item, focusContext) {
|
function reload(page, item, focusContext) {
|
||||||
|
|
|
@ -3609,9 +3609,10 @@ class PlaybackManager {
|
||||||
|
|
||||||
const apiClient = ServerConnections.getApiClient(item.ServerId);
|
const apiClient = ServerConnections.getApiClient(item.ServerId);
|
||||||
|
|
||||||
const options = {};
|
const options = {
|
||||||
options.UserId = apiClient.getCurrentUserId();
|
UserId: apiClient.getCurrentUserId(),
|
||||||
options.Limit = 200;
|
Limit: 200
|
||||||
|
};
|
||||||
|
|
||||||
const instance = this;
|
const instance = this;
|
||||||
|
|
||||||
|
|
|
@ -25,17 +25,15 @@ import template from './subtitlesettings.template.html';
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function getSubtitleAppearanceObject(context) {
|
function getSubtitleAppearanceObject(context) {
|
||||||
const appearanceSettings = {};
|
return {
|
||||||
|
textSize: context.querySelector('#selectTextSize').value,
|
||||||
appearanceSettings.textSize = context.querySelector('#selectTextSize').value;
|
textWeight: context.querySelector('#selectTextWeight').value,
|
||||||
appearanceSettings.textWeight = context.querySelector('#selectTextWeight').value;
|
dropShadow: context.querySelector('#selectDropShadow').value,
|
||||||
appearanceSettings.dropShadow = context.querySelector('#selectDropShadow').value;
|
font: context.querySelector('#selectFont').value,
|
||||||
appearanceSettings.font = context.querySelector('#selectFont').value;
|
textBackground: context.querySelector('#inputTextBackground').value,
|
||||||
appearanceSettings.textBackground = context.querySelector('#inputTextBackground').value;
|
textColor: layoutManager.tv ? context.querySelector('#selectTextColor').value : context.querySelector('#inputTextColor').value,
|
||||||
appearanceSettings.textColor = layoutManager.tv ? context.querySelector('#selectTextColor').value : context.querySelector('#inputTextColor').value;
|
verticalPosition: context.querySelector('#sliderVerticalPosition').value
|
||||||
appearanceSettings.verticalPosition = context.querySelector('#sliderVerticalPosition').value;
|
};
|
||||||
|
|
||||||
return appearanceSettings;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadForm(context, user, userSettings, appearanceSettings, apiClient) {
|
function loadForm(context, user, userSettings, appearanceSettings, apiClient) {
|
||||||
|
|
|
@ -7,9 +7,11 @@ import Dashboard from '../../../utils/dashboard';
|
||||||
function save(page) {
|
function save(page) {
|
||||||
loading.show();
|
loading.show();
|
||||||
const apiClient = ApiClient;
|
const apiClient = ApiClient;
|
||||||
const config = {};
|
const config = {
|
||||||
config.EnableRemoteAccess = page.querySelector('#chkRemoteAccess').checked;
|
EnableRemoteAccess: page.querySelector('#chkRemoteAccess').checked,
|
||||||
config.EnableAutomaticPortMapping = page.querySelector('#chkEnableUpnp').checked;
|
EnableAutomaticPortMapping: page.querySelector('#chkEnableUpnp').checked
|
||||||
|
};
|
||||||
|
|
||||||
apiClient.ajax({
|
apiClient.ajax({
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
data: JSON.stringify(config),
|
data: JSON.stringify(config),
|
||||||
|
|
|
@ -349,13 +349,12 @@ import browser from './browser';
|
||||||
|
|
||||||
const canPlayMkv = testCanPlayMkv(videoTestElement);
|
const canPlayMkv = testCanPlayMkv(videoTestElement);
|
||||||
|
|
||||||
const profile = {};
|
const profile = {
|
||||||
|
MaxStreamingBitrate: bitrateSetting,
|
||||||
profile.MaxStreamingBitrate = bitrateSetting;
|
MaxStaticBitrate: 100000000,
|
||||||
profile.MaxStaticBitrate = 100000000;
|
MusicStreamingTranscodingBitrate: Math.min(bitrateSetting, 384000),
|
||||||
profile.MusicStreamingTranscodingBitrate = Math.min(bitrateSetting, 384000);
|
DirectPlayProfiles: []
|
||||||
|
};
|
||||||
profile.DirectPlayProfiles = [];
|
|
||||||
|
|
||||||
let videoAudioCodecs = [];
|
let videoAudioCodecs = [];
|
||||||
let hlsInTsVideoAudioCodecs = [];
|
let hlsInTsVideoAudioCodecs = [];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue