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