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
|
@ -97,7 +97,7 @@ import alert from './alert';
|
||||||
}
|
}
|
||||||
|
|
||||||
instance.items = result.Items;
|
instance.items = result.Items;
|
||||||
renderList(elem, apiClient, result, startIndex, limit);
|
renderList(elem, apiClient, result);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,10 +10,10 @@ function render() {
|
||||||
}
|
}
|
||||||
|
|
||||||
class appFooter {
|
class appFooter {
|
||||||
constructor(options) {
|
constructor() {
|
||||||
const self = this;
|
const self = this;
|
||||||
|
|
||||||
self.element = render(options);
|
self.element = render();
|
||||||
self.add = function (elem) {
|
self.add = function (elem) {
|
||||||
self.element.appendChild(elem);
|
self.element.appendChild(elem);
|
||||||
};
|
};
|
||||||
|
@ -33,4 +33,4 @@ class appFooter {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default new appFooter({});
|
export default new appFooter();
|
||||||
|
|
|
@ -47,7 +47,7 @@ import ServerConnections from '../ServerConnections';
|
||||||
backdropImage.classList.add('backdropImageFadeIn');
|
backdropImage.classList.add('backdropImageFadeIn');
|
||||||
parent.appendChild(backdropImage);
|
parent.appendChild(backdropImage);
|
||||||
|
|
||||||
if (!enableAnimation(backdropImage)) {
|
if (!enableAnimation()) {
|
||||||
if (existingBackdropImage && existingBackdropImage.parentNode) {
|
if (existingBackdropImage && existingBackdropImage.parentNode) {
|
||||||
existingBackdropImage.parentNode.removeChild(existingBackdropImage);
|
existingBackdropImage.parentNode.removeChild(existingBackdropImage);
|
||||||
}
|
}
|
||||||
|
|
|
@ -275,12 +275,12 @@ import template from './homeScreenSettings.template.html';
|
||||||
return html;
|
return html;
|
||||||
}
|
}
|
||||||
|
|
||||||
function renderPerLibrarySettings(context, user, userViews, userSettings, apiClient) {
|
function renderPerLibrarySettings(context, user, userViews) {
|
||||||
const elem = context.querySelector('.perLibrarySettings');
|
const elem = context.querySelector('.perLibrarySettings');
|
||||||
let html = '';
|
let html = '';
|
||||||
|
|
||||||
for (let i = 0, length = userViews.length; i < length; i++) {
|
for (let i = 0, length = userViews.length; i < length; i++) {
|
||||||
html += getPerLibrarySettingsHtml(userViews[i], user, userSettings, apiClient);
|
html += getPerLibrarySettingsHtml(userViews[i], user);
|
||||||
}
|
}
|
||||||
|
|
||||||
elem.innerHTML = html;
|
elem.innerHTML = html;
|
||||||
|
@ -297,7 +297,7 @@ import template from './homeScreenSettings.template.html';
|
||||||
Promise.all([promise1, promise2]).then(responses => {
|
Promise.all([promise1, promise2]).then(responses => {
|
||||||
renderViewOrder(context, user, responses[0]);
|
renderViewOrder(context, user, responses[0]);
|
||||||
|
|
||||||
renderPerLibrarySettings(context, user, responses[0].Items, userSettings, apiClient);
|
renderPerLibrarySettings(context, user, responses[0].Items);
|
||||||
|
|
||||||
renderViews(context, user, responses[1]);
|
renderViews(context, user, responses[1]);
|
||||||
|
|
||||||
|
|
|
@ -140,17 +140,17 @@ import ServerConnections from '../ServerConnections';
|
||||||
if (section === 'latestmedia') {
|
if (section === 'latestmedia') {
|
||||||
loadRecentlyAdded(elem, apiClient, user, userViews);
|
loadRecentlyAdded(elem, apiClient, user, userViews);
|
||||||
} else if (section === 'librarytiles' || section === 'smalllibrarytiles' || section === 'smalllibrarytiles-automobile' || section === 'librarytiles-automobile') {
|
} else if (section === 'librarytiles' || section === 'smalllibrarytiles' || section === 'smalllibrarytiles-automobile' || section === 'librarytiles-automobile') {
|
||||||
loadLibraryTiles(elem, apiClient, user, userSettings, 'smallBackdrop', userViews, allSections);
|
loadLibraryTiles(elem, apiClient, user, userSettings, 'smallBackdrop', userViews);
|
||||||
} else if (section === 'librarybuttons') {
|
} else if (section === 'librarybuttons') {
|
||||||
loadlibraryButtons(elem, apiClient, user, userSettings, userViews);
|
loadlibraryButtons(elem, apiClient, user, userSettings, userViews);
|
||||||
} else if (section === 'resume') {
|
} else if (section === 'resume') {
|
||||||
loadResumeVideo(elem, apiClient, userId);
|
loadResumeVideo(elem, apiClient);
|
||||||
} else if (section === 'resumeaudio') {
|
} else if (section === 'resumeaudio') {
|
||||||
loadResumeAudio(elem, apiClient, userId);
|
loadResumeAudio(elem, apiClient);
|
||||||
} else if (section === 'activerecordings') {
|
} else if (section === 'activerecordings') {
|
||||||
loadLatestLiveTvRecordings(elem, true, apiClient, userId);
|
loadLatestLiveTvRecordings(elem, true, apiClient);
|
||||||
} else if (section === 'nextup') {
|
} else if (section === 'nextup') {
|
||||||
loadNextUp(elem, apiClient, userId);
|
loadNextUp(elem, apiClient);
|
||||||
} else if (section === 'onnow' || section === 'livetv') {
|
} else if (section === 'onnow' || section === 'livetv') {
|
||||||
return loadOnNow(elem, apiClient, user);
|
return loadOnNow(elem, apiClient, user);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -142,7 +142,7 @@ import '../elements/emby-button/emby-button';
|
||||||
|
|
||||||
tabsElem = tabsContainerElem.querySelector('[is="emby-tabs"]');
|
tabsElem = tabsContainerElem.querySelector('[is="emby-tabs"]');
|
||||||
|
|
||||||
configureSwipeTabs(view, tabsElem, getTabContainersFn);
|
configureSwipeTabs(view, tabsElem);
|
||||||
|
|
||||||
tabsElem.addEventListener('beforetabchange', function (e) {
|
tabsElem.addEventListener('beforetabchange', function (e) {
|
||||||
const tabContainers = getTabContainersFn();
|
const tabContainers = getTabContainersFn();
|
||||||
|
|
|
@ -42,7 +42,7 @@ import template from './metadataEditor.template.html';
|
||||||
toast(globalize.translate('MessageItemSaved'));
|
toast(globalize.translate('MessageItemSaved'));
|
||||||
|
|
||||||
loading.hide();
|
loading.hide();
|
||||||
closeDialog(true);
|
closeDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
const apiClient = getApiClient();
|
const apiClient = getApiClient();
|
||||||
|
@ -319,7 +319,7 @@ import template from './metadataEditor.template.html';
|
||||||
|
|
||||||
bindAll(context.querySelectorAll('.btnCancel'), 'click', function (event) {
|
bindAll(context.querySelectorAll('.btnCancel'), 'click', function (event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
closeDialog(false);
|
closeDialog();
|
||||||
});
|
});
|
||||||
|
|
||||||
context.querySelector('.btnMore').addEventListener('click', function (e) {
|
context.querySelector('.btnMore').addEventListener('click', function (e) {
|
||||||
|
@ -1066,15 +1066,15 @@ import template from './metadataEditor.template.html';
|
||||||
|
|
||||||
currentContext = dlg;
|
currentContext = dlg;
|
||||||
|
|
||||||
init(dlg, ServerConnections.getApiClient(serverId));
|
init(dlg);
|
||||||
|
|
||||||
reload(dlg, itemId, serverId);
|
reload(dlg, itemId, serverId);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
show: function (itemId, serverId) {
|
show: function (itemId, serverId) {
|
||||||
return new Promise(function (resolve, reject) {
|
return new Promise(function (resolve) {
|
||||||
return show(itemId, serverId, resolve, reject);
|
return show(itemId, serverId, resolve);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -1091,7 +1091,7 @@ import template from './metadataEditor.template.html';
|
||||||
|
|
||||||
currentContext = elem;
|
currentContext = elem;
|
||||||
|
|
||||||
init(elem, ServerConnections.getApiClient(serverId));
|
init(elem);
|
||||||
reload(elem, itemId, serverId);
|
reload(elem, itemId, serverId);
|
||||||
|
|
||||||
focusManager.autoFocus(elem);
|
focusManager.autoFocus(elem);
|
||||||
|
|
|
@ -440,13 +440,13 @@ import confirm from '../confirm/confirm';
|
||||||
deltaY = 100;
|
deltaY = 100;
|
||||||
}
|
}
|
||||||
if (deltaX >= 5 || deltaY >= 5) {
|
if (deltaX >= 5 || deltaY >= 5) {
|
||||||
onMouseOut(e);
|
onMouseOut();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function onTouchEnd(e) {
|
function onTouchEnd() {
|
||||||
onMouseOut(e);
|
onMouseOut();
|
||||||
}
|
}
|
||||||
|
|
||||||
function onMouseDown(e) {
|
function onMouseDown(e) {
|
||||||
|
|
|
@ -77,7 +77,7 @@ function showNotification(options, timeoutMs, apiClient) {
|
||||||
resetRegistration();
|
resetRegistration();
|
||||||
|
|
||||||
if (serviceWorkerRegistration) {
|
if (serviceWorkerRegistration) {
|
||||||
showPersistentNotification(title, options, timeoutMs);
|
showPersistentNotification(title, options);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2048,7 +2048,7 @@ class PlaybackManager {
|
||||||
return player.play(options);
|
return player.play(options);
|
||||||
}
|
}
|
||||||
|
|
||||||
function playWithIntros(items, options, user) {
|
function playWithIntros(items, options) {
|
||||||
let playStartIndex = options.startIndex || 0;
|
let playStartIndex = options.startIndex || 0;
|
||||||
let firstItem = items[playStartIndex];
|
let firstItem = items[playStartIndex];
|
||||||
|
|
||||||
|
@ -2065,7 +2065,7 @@ class PlaybackManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (firstItem.MediaType === 'Photo' || firstItem.MediaType === 'Book') {
|
if (firstItem.MediaType === 'Photo' || firstItem.MediaType === 'Book') {
|
||||||
return playOther(items, options, user);
|
return playOther(items, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
const apiClient = ServerConnections.getApiClient(firstItem.ServerId);
|
const apiClient = ServerConnections.getApiClient(firstItem.ServerId);
|
||||||
|
|
|
@ -79,7 +79,7 @@ function reload(context, id) {
|
||||||
|
|
||||||
const apiClient = ServerConnections.getApiClient(currentServerId);
|
const apiClient = ServerConnections.getApiClient(currentServerId);
|
||||||
apiClient.getLiveTvTimer(id).then(function (result) {
|
apiClient.getLiveTvTimer(id).then(function (result) {
|
||||||
renderTimer(context, result, apiClient);
|
renderTimer(context, result);
|
||||||
loading.hide();
|
loading.hide();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,7 +55,7 @@ function fetchData(instance) {
|
||||||
instance.TimerId = program.TimerId;
|
instance.TimerId = program.TimerId;
|
||||||
instance.Status = program.Status;
|
instance.Status = program.Status;
|
||||||
instance.SeriesTimerId = program.SeriesTimerId;
|
instance.SeriesTimerId = program.SeriesTimerId;
|
||||||
loadData(options.parent, program, apiClient);
|
loadData(options.parent, program);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -727,12 +727,12 @@ export default function () {
|
||||||
});
|
});
|
||||||
context.querySelector('.btnAudioTracks').addEventListener('click', function (e) {
|
context.querySelector('.btnAudioTracks').addEventListener('click', function (e) {
|
||||||
if (currentPlayer && lastPlayerState && lastPlayerState.NowPlayingItem) {
|
if (currentPlayer && lastPlayerState && lastPlayerState.NowPlayingItem) {
|
||||||
showAudioMenu(context, currentPlayer, e.target, lastPlayerState.NowPlayingItem);
|
showAudioMenu(context, currentPlayer, e.target);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
context.querySelector('.btnSubtitles').addEventListener('click', function (e) {
|
context.querySelector('.btnSubtitles').addEventListener('click', function (e) {
|
||||||
if (currentPlayer && lastPlayerState && lastPlayerState.NowPlayingItem) {
|
if (currentPlayer && lastPlayerState && lastPlayerState.NowPlayingItem) {
|
||||||
showSubtitleMenu(context, currentPlayer, e.target, lastPlayerState.NowPlayingItem);
|
showSubtitleMenu(context, currentPlayer, e.target);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
context.querySelector('.btnStop').addEventListener('click', function () {
|
context.querySelector('.btnStop').addEventListener('click', function () {
|
||||||
|
@ -946,7 +946,7 @@ export default function () {
|
||||||
};
|
};
|
||||||
|
|
||||||
self.onShow = function () {
|
self.onShow = function () {
|
||||||
onShow(dlg, window.location.hash);
|
onShow(dlg);
|
||||||
};
|
};
|
||||||
|
|
||||||
self.destroy = function () {
|
self.destroy = function () {
|
||||||
|
|
|
@ -89,7 +89,7 @@ import template from './searchfields.template.html';
|
||||||
class SearchFields {
|
class SearchFields {
|
||||||
constructor(options) {
|
constructor(options) {
|
||||||
this.options = options;
|
this.options = options;
|
||||||
embed(options.element, this, options);
|
embed(options.element, this);
|
||||||
}
|
}
|
||||||
focus() {
|
focus() {
|
||||||
this.options.element.querySelector('.searchfields-txtSearch').focus();
|
this.options.element.querySelector('.searchfields-txtSearch').focus();
|
||||||
|
|
|
@ -603,7 +603,7 @@ import template from './searchresults.template.html';
|
||||||
class SearchResults {
|
class SearchResults {
|
||||||
constructor(options) {
|
constructor(options) {
|
||||||
this.options = options;
|
this.options = options;
|
||||||
embed(options.element, this, options);
|
embed(options.element, this);
|
||||||
}
|
}
|
||||||
search(value) {
|
search(value) {
|
||||||
const apiClient = ServerConnections.getApiClient(this.options.serverId);
|
const apiClient = ServerConnections.getApiClient(this.options.serverId);
|
||||||
|
|
|
@ -161,9 +161,9 @@ function showEditor(options, resolve) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function show(options) {
|
export function show(options) {
|
||||||
return new Promise(function (resolve, reject) {
|
return new Promise(function (resolve) {
|
||||||
hasChanges = false;
|
hasChanges = false;
|
||||||
showEditor(options, resolve, reject);
|
showEditor(options, resolve);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -176,7 +176,7 @@ class NoActivePlayer extends SyncPlay.Players.GenericPlayer {
|
||||||
if (typeof commandHandler === 'function') {
|
if (typeof commandHandler === 'function') {
|
||||||
commandHandler(command, player);
|
commandHandler(command, player);
|
||||||
} else {
|
} else {
|
||||||
defaultAction(command, player);
|
defaultAction(command);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -163,8 +163,7 @@ function tunerPicker() {
|
||||||
scrollHelper.centerFocus.on(dlg.querySelector('.formDialogContent'), false);
|
scrollHelper.centerFocus.on(dlg.querySelector('.formDialogContent'), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
const apiClient = ServerConnections.getApiClient(options.serverId);
|
discoverDevices(dlg);
|
||||||
discoverDevices(dlg, apiClient);
|
|
||||||
|
|
||||||
if (layoutManager.tv) {
|
if (layoutManager.tv) {
|
||||||
scrollHelper.centerFocus.off(dlg.querySelector('.formDialogContent'), false);
|
scrollHelper.centerFocus.off(dlg.querySelector('.formDialogContent'), false);
|
||||||
|
|
|
@ -224,11 +224,11 @@ import confirm from '../../components/confirm/confirm';
|
||||||
loading.hide();
|
loading.hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
function pollForInfo(view, apiClient, forceUpdate) {
|
function pollForInfo(view, apiClient) {
|
||||||
apiClient.getSessions({
|
apiClient.getSessions({
|
||||||
ActiveWithinSeconds: 960
|
ActiveWithinSeconds: 960
|
||||||
}).then(function (sessions) {
|
}).then(function (sessions) {
|
||||||
renderInfo(view, sessions, forceUpdate);
|
renderInfo(view, sessions);
|
||||||
});
|
});
|
||||||
apiClient.getScheduledTasks().then(function (tasks) {
|
apiClient.getScheduledTasks().then(function (tasks) {
|
||||||
renderRunningTasks(view, tasks);
|
renderRunningTasks(view, tasks);
|
||||||
|
@ -745,14 +745,14 @@ import confirm from '../../components/confirm/confirm';
|
||||||
|
|
||||||
function onPackageInstalling(evt, apiClient) {
|
function onPackageInstalling(evt, apiClient) {
|
||||||
if (apiClient.serverId() === serverId) {
|
if (apiClient.serverId() === serverId) {
|
||||||
pollForInfo(view, apiClient, true);
|
pollForInfo(view, apiClient);
|
||||||
reloadSystemInfo(view, apiClient);
|
reloadSystemInfo(view, apiClient);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function onPackageInstallationCompleted(evt, apiClient) {
|
function onPackageInstallationCompleted(evt, apiClient) {
|
||||||
if (apiClient.serverId() === serverId) {
|
if (apiClient.serverId() === serverId) {
|
||||||
pollForInfo(view, apiClient, true);
|
pollForInfo(view, apiClient);
|
||||||
reloadSystemInfo(view, apiClient);
|
reloadSystemInfo(view, apiClient);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,7 @@ import alert from '../../components/alert';
|
||||||
config.EnableExtraThumbsDuplication = form.querySelector('#chkEnableExtraThumbs').checked;
|
config.EnableExtraThumbsDuplication = form.querySelector('#chkEnableExtraThumbs').checked;
|
||||||
ApiClient.updateNamedConfiguration(metadataKey, config).then(function () {
|
ApiClient.updateNamedConfiguration(metadataKey, config).then(function () {
|
||||||
Dashboard.processServerConfigurationUpdateResult();
|
Dashboard.processServerConfigurationUpdateResult();
|
||||||
showConfirmMessage(config);
|
showConfirmMessage();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -146,7 +146,7 @@ import toast from '../../../components/toast/toast';
|
||||||
}
|
}
|
||||||
ApiClient.updateUser(user).then(function () {
|
ApiClient.updateUser(user).then(function () {
|
||||||
ApiClient.updateUserPolicy(user.Id, user.Policy).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.BlockedChannels = null;
|
||||||
user.Policy.BlockedMediaFolders = null;
|
user.Policy.BlockedMediaFolders = null;
|
||||||
ApiClient.updateUserPolicy(user.Id, user.Policy).then(function () {
|
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.AccessSchedules = getSchedulesFromPage(page);
|
||||||
user.Policy.BlockedTags = getBlockedTagsFromPage(page);
|
user.Policy.BlockedTags = getBlockedTagsFromPage(page);
|
||||||
ApiClient.updateUserPolicy(user.Id, user.Policy).then(function () {
|
ApiClient.updateUserPolicy(user.Id, user.Policy).then(function () {
|
||||||
onSaveComplete(page);
|
onSaveComplete();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -146,14 +146,14 @@ import cardBuilder from '../../../components/cardbuilder/cardBuilder';
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
function getUserSectionHtml(users, addConnectIndicator) {
|
function getUserSectionHtml(users) {
|
||||||
return users.map(function (u__q) {
|
return users.map(function (u__q) {
|
||||||
return getUserHtml(u__q, addConnectIndicator);
|
return getUserHtml(u__q);
|
||||||
}).join('');
|
}).join('');
|
||||||
}
|
}
|
||||||
|
|
||||||
function renderUsers(page, users) {
|
function renderUsers(page, users) {
|
||||||
page.querySelector('.localUsers').innerHTML = getUserSectionHtml(users, true);
|
page.querySelector('.localUsers').innerHTML = getUserSectionHtml(users);
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadData(page) {
|
function loadData(page) {
|
||||||
|
|
|
@ -296,7 +296,7 @@ function onDevicesListClick(e) {
|
||||||
$(document).on('pageinit', '#liveTvStatusPage', function () {
|
$(document).on('pageinit', '#liveTvStatusPage', function () {
|
||||||
const page = this;
|
const page = this;
|
||||||
$('.btnAddDevice', page).on('click', function () {
|
$('.btnAddDevice', page).on('click', function () {
|
||||||
addDevice(this);
|
addDevice();
|
||||||
});
|
});
|
||||||
$('.formAddDevice', page).on('submit', function () {
|
$('.formAddDevice', page).on('submit', function () {
|
||||||
submitAddDeviceForm(page);
|
submitAddDeviceForm(page);
|
||||||
|
|
|
@ -222,7 +222,7 @@ import Dashboard from '../../scripts/clientUtils';
|
||||||
const userId = ApiClient.getCurrentUserId();
|
const userId = ApiClient.getCurrentUserId();
|
||||||
loadResume(tabContent, userId, parentId);
|
loadResume(tabContent, userId, parentId);
|
||||||
loadLatest(tabContent, userId, parentId);
|
loadLatest(tabContent, userId, parentId);
|
||||||
loadSuggestions(tabContent, userId, parentId);
|
loadSuggestions(tabContent, userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getTabs() {
|
function getTabs() {
|
||||||
|
|
|
@ -112,7 +112,7 @@ import '../../elements/emby-itemscontainer/emby-itemscontainer';
|
||||||
}
|
}
|
||||||
|
|
||||||
window.scrollTo(0, 0);
|
window.scrollTo(0, 0);
|
||||||
updateFilterControls(page);
|
updateFilterControls();
|
||||||
let html;
|
let html;
|
||||||
const pagingHtml = libraryBrowser.getQueryPagingHtml({
|
const pagingHtml = libraryBrowser.getQueryPagingHtml({
|
||||||
startIndex: query.StartIndex,
|
startIndex: query.StartIndex,
|
||||||
|
@ -304,7 +304,7 @@ import '../../elements/emby-itemscontainer/emby-itemscontainer';
|
||||||
|
|
||||||
this.renderTab = function () {
|
this.renderTab = function () {
|
||||||
reloadItems(tabContent);
|
reloadItems(tabContent);
|
||||||
updateFilterControls(tabContent);
|
updateFilterControls();
|
||||||
};
|
};
|
||||||
|
|
||||||
this.destroy = function () {};
|
this.destroy = function () {};
|
||||||
|
|
|
@ -426,7 +426,7 @@ import { appRouter } from '../../../components/appRouter';
|
||||||
if (state.NowPlayingItem) {
|
if (state.NowPlayingItem) {
|
||||||
isEnabled = true;
|
isEnabled = true;
|
||||||
updatePlayerStateInternal(event, player, state);
|
updatePlayerStateInternal(event, player, state);
|
||||||
updatePlaylist(player);
|
updatePlaylist();
|
||||||
enableStopOnBack(true);
|
enableStopOnBack(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,8 +19,8 @@ import '../../assets/css/scrollstyles.scss';
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
function removeActivePanelClass(tabs, index) {
|
function removeActivePanelClass() {
|
||||||
const tabPanel = getTabPanel(tabs, index);
|
const tabPanel = getTabPanel();
|
||||||
if (tabPanel) {
|
if (tabPanel) {
|
||||||
tabPanel.classList.remove('is-active');
|
tabPanel.classList.remove('is-active');
|
||||||
}
|
}
|
||||||
|
@ -48,10 +48,10 @@ import '../../assets/css/scrollstyles.scss';
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
if (previousIndex != null && previousIndex !== index) {
|
if (previousIndex != null && previousIndex !== index) {
|
||||||
removeActivePanelClass(tabs, previousIndex);
|
removeActivePanelClass();
|
||||||
}
|
}
|
||||||
|
|
||||||
const newPanel = getTabPanel(tabs, index);
|
const newPanel = getTabPanel();
|
||||||
|
|
||||||
if (newPanel) {
|
if (newPanel) {
|
||||||
// animate new panel ?
|
// animate new panel ?
|
||||||
|
|
|
@ -101,7 +101,7 @@ function processUpdatedSessions(instance, sessions, apiClient) {
|
||||||
if (session) {
|
if (session) {
|
||||||
normalizeImages(session, apiClient);
|
normalizeImages(session, apiClient);
|
||||||
|
|
||||||
const eventNames = getChangedEvents(instance.lastPlayerData, session);
|
const eventNames = getChangedEvents(instance.lastPlayerData);
|
||||||
instance.lastPlayerData = session;
|
instance.lastPlayerData = session;
|
||||||
|
|
||||||
for (let i = 0, length = eventNames.length; i < length; i++) {
|
for (let i = 0, length = eventNames.length; i < length; i++) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue