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

fix import for fileDownloader in itemDetails

This commit is contained in:
vitorsemeano 2020-11-08 19:44:19 +00:00
parent 5b5d6a45b0
commit 5a413a9e07

View file

@ -30,6 +30,7 @@ import itemShortcuts from '../../components/shortcuts';
import Dashboard from '../../scripts/clientUtils'; import Dashboard from '../../scripts/clientUtils';
import ServerConnections from '../../components/ServerConnections'; import ServerConnections from '../../components/ServerConnections';
import confirm from '../../components/confirm/confirm'; import confirm from '../../components/confirm/confirm';
import { download } from '../../scripts/fileDownloader';
function getPromise(apiClient, params) { function getPromise(apiClient, params) {
const id = params.id; const id = params.id;
@ -1958,14 +1959,12 @@ export default function (view, params) {
} }
function onDownloadClick() { function onDownloadClick() {
import('../../scripts/fileDownloader').then(({ default: fileDownloader }) => {
const downloadHref = getApiClient().getItemDownloadUrl(currentItem.Id); const downloadHref = getApiClient().getItemDownloadUrl(currentItem.Id);
fileDownloader.download([{ download([{
url: downloadHref, url: downloadHref,
itemId: currentItem.Id, itemId: currentItem.Id,
serverId: currentItem.serverId serverId: currentItem.serverId
}]); }]);
});
} }
function onMoreCommandsClick() { function onMoreCommandsClick() {