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

Fix sonarqube issues

This commit is contained in:
Bill Thornton 2021-01-27 00:35:30 -05:00
parent be9f964c18
commit a3949c1889
30 changed files with 58 additions and 59 deletions

View file

@ -224,11 +224,11 @@ import confirm from '../../components/confirm/confirm';
loading.hide();
}
function pollForInfo(view, apiClient, forceUpdate) {
function pollForInfo(view, apiClient) {
apiClient.getSessions({
ActiveWithinSeconds: 960
}).then(function (sessions) {
renderInfo(view, sessions, forceUpdate);
renderInfo(view, sessions);
});
apiClient.getScheduledTasks().then(function (tasks) {
renderRunningTasks(view, tasks);
@ -745,14 +745,14 @@ import confirm from '../../components/confirm/confirm';
function onPackageInstalling(evt, apiClient) {
if (apiClient.serverId() === serverId) {
pollForInfo(view, apiClient, true);
pollForInfo(view, apiClient);
reloadSystemInfo(view, apiClient);
}
}
function onPackageInstallationCompleted(evt, apiClient) {
if (apiClient.serverId() === serverId) {
pollForInfo(view, apiClient, true);
pollForInfo(view, apiClient);
reloadSystemInfo(view, apiClient);
}
}

View file

@ -31,7 +31,7 @@ import alert from '../../components/alert';
config.EnableExtraThumbsDuplication = form.querySelector('#chkEnableExtraThumbs').checked;
ApiClient.updateNamedConfiguration(metadataKey, config).then(function () {
Dashboard.processServerConfigurationUpdateResult();
showConfirmMessage(config);
showConfirmMessage();
});
});
return false;

View file

@ -146,7 +146,7 @@ import toast from '../../../components/toast/toast';
}
ApiClient.updateUser(user).then(function () {
ApiClient.updateUserPolicy(user.Id, user.Policy).then(function () {
onSaveComplete(page, user);
onSaveComplete();
});
});
}

View file

@ -118,7 +118,7 @@ import toast from '../../../components/toast/toast';
user.Policy.BlockedChannels = null;
user.Policy.BlockedMediaFolders = null;
ApiClient.updateUserPolicy(user.Id, user.Policy).then(function () {
onSaveComplete(page);
onSaveComplete();
});
}

View file

@ -176,7 +176,7 @@ import toast from '../../../components/toast/toast';
user.Policy.AccessSchedules = getSchedulesFromPage(page);
user.Policy.BlockedTags = getBlockedTagsFromPage(page);
ApiClient.updateUserPolicy(user.Id, user.Policy).then(function () {
onSaveComplete(page);
onSaveComplete();
});
}

View file

@ -146,14 +146,14 @@ import cardBuilder from '../../../components/cardbuilder/cardBuilder';
return '';
}
function getUserSectionHtml(users, addConnectIndicator) {
function getUserSectionHtml(users) {
return users.map(function (u__q) {
return getUserHtml(u__q, addConnectIndicator);
return getUserHtml(u__q);
}).join('');
}
function renderUsers(page, users) {
page.querySelector('.localUsers').innerHTML = getUserSectionHtml(users, true);
page.querySelector('.localUsers').innerHTML = getUserSectionHtml(users);
}
function loadData(page) {

View file

@ -296,7 +296,7 @@ function onDevicesListClick(e) {
$(document).on('pageinit', '#liveTvStatusPage', function () {
const page = this;
$('.btnAddDevice', page).on('click', function () {
addDevice(this);
addDevice();
});
$('.formAddDevice', page).on('submit', function () {
submitAddDeviceForm(page);

View file

@ -222,7 +222,7 @@ import Dashboard from '../../scripts/clientUtils';
const userId = ApiClient.getCurrentUserId();
loadResume(tabContent, userId, parentId);
loadLatest(tabContent, userId, parentId);
loadSuggestions(tabContent, userId, parentId);
loadSuggestions(tabContent, userId);
}
function getTabs() {

View file

@ -112,7 +112,7 @@ import '../../elements/emby-itemscontainer/emby-itemscontainer';
}
window.scrollTo(0, 0);
updateFilterControls(page);
updateFilterControls();
let html;
const pagingHtml = libraryBrowser.getQueryPagingHtml({
startIndex: query.StartIndex,
@ -304,7 +304,7 @@ import '../../elements/emby-itemscontainer/emby-itemscontainer';
this.renderTab = function () {
reloadItems(tabContent);
updateFilterControls(tabContent);
updateFilterControls();
};
this.destroy = function () {};

View file

@ -426,7 +426,7 @@ import { appRouter } from '../../../components/appRouter';
if (state.NowPlayingItem) {
isEnabled = true;
updatePlayerStateInternal(event, player, state);
updatePlaylist(player);
updatePlaylist();
enableStopOnBack(true);
}
}