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

make download function modular

This commit is contained in:
Luke Pulverenti 2016-03-29 01:16:44 -04:00
parent ae57b97712
commit 4a50925c17
7 changed files with 118 additions and 111 deletions

View file

@ -478,10 +478,17 @@
break;
case 'download':
{
var downloadHref = ApiClient.getUrl("Items/" + itemId + "/Download", {
api_key: ApiClient.accessToken()
require(['fileDownloader'], function (fileDownloader) {
var downloadHref = ApiClient.getUrl("Items/" + itemId + "/Download", {
api_key: ApiClient.accessToken()
});
fileDownloader([{
url: downloadHref,
itemId: itemId
}]);
});
window.location.href = downloadHref;
break;
}