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

fix: eslint no-shadow errors

This commit is contained in:
Aimekram 2022-10-16 16:04:37 +02:00
parent 6a93a2eb29
commit 832b9eaf4d
30 changed files with 273 additions and 271 deletions

View file

@ -770,7 +770,7 @@ function renderLinks(page, item) {
}
}
function renderDetailImage(elem, item, imageLoader) {
function renderDetailImage(elem, item, loader) {
const itemArray = [];
itemArray.push(item);
const cardHtml = cardBuilder.getCardsHtml(itemArray, {
@ -787,7 +787,7 @@ function renderDetailImage(elem, item, imageLoader) {
});
elem.innerHTML = cardHtml;
imageLoader.lazyChildren(elem);
loader.lazyChildren(elem);
// Avoid breaking the design by preventing focus of the poster using the keyboard.
elem.querySelector('a, button').tabIndex = -1;
@ -1881,28 +1881,28 @@ export default function (view, params) {
return params.serverId ? ServerConnections.getApiClient(params.serverId) : ApiClient;
}
function reload(instance, page, params) {
function reload(instance, page, pageParams) {
loading.show();
const apiClient = getApiClient();
Promise.all([getPromise(apiClient, params), apiClient.getCurrentUser()]).then(([item, user]) => {
Promise.all([getPromise(apiClient, pageParams), apiClient.getCurrentUser()]).then(([item, user]) => {
currentItem = item;
reloadFromItem(instance, page, params, item, user);
reloadFromItem(instance, page, pageParams, item, user);
}).catch((error) => {
console.error('failed to get item or current user: ', error);
});
}
function splitVersions(instance, page, apiClient, params) {
function splitVersions(instance, page, apiClient, pageParams) {
confirm('Are you sure you wish to split the media sources into separate items?', 'Split Media Apart').then(function () {
loading.show();
apiClient.ajax({
type: 'DELETE',
url: apiClient.getUrl('Videos/' + params.id + '/AlternateSources')
url: apiClient.getUrl('Videos/' + pageParams.id + '/AlternateSources')
}).then(function () {
loading.hide();
reload(instance, page, params);
reload(instance, page, pageParams);
});
});
}