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:
parent
be9f964c18
commit
a3949c1889
30 changed files with 58 additions and 59 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -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();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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 () {};
|
||||
|
|
|
@ -426,7 +426,7 @@ import { appRouter } from '../../../components/appRouter';
|
|||
if (state.NowPlayingItem) {
|
||||
isEnabled = true;
|
||||
updatePlayerStateInternal(event, player, state);
|
||||
updatePlaylist(player);
|
||||
updatePlaylist();
|
||||
enableStopOnBack(true);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue