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

Fix code smells

This commit is contained in:
Bill Thornton 2020-11-25 10:28:41 -05:00
parent 1a0789f7b9
commit 2d97a56f51
5 changed files with 32 additions and 40 deletions

View file

@ -163,7 +163,7 @@ import template from './itemMediaInfo.template.html';
return `<span class="mediaInfoLabel">${label}</span><span class="mediaInfoAttribute">${value}</span>`;
}
function loadMediaInfo(itemId, serverId, template) {
function loadMediaInfo(itemId, serverId) {
const apiClient = ServerConnections.getApiClient(serverId);
return apiClient.getItem(apiClient.getCurrentUserId(), itemId).then(item => {
const dialogOptions = {
@ -195,9 +195,7 @@ import template from './itemMediaInfo.template.html';
export function show(itemId, serverId) {
loading.show();
return new Promise((resolve, reject) => {
loadMediaInfo(itemId, serverId, template).then(resolve, reject);
});
return loadMediaInfo(itemId, serverId);
}
/* eslint-enable indent */