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

Merge pull request #1068 from jellyfin/download

Pass title and filename to native shell
This commit is contained in:
Vasily 2020-04-12 23:54:37 +03:00 committed by GitHub
commit ed3b140379
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View file

@ -4,7 +4,7 @@ export function download(items) {
if (window.NativeShell) { if (window.NativeShell) {
items.map(function (item) { items.map(function (item) {
window.NativeShell.downloadFile(item.url); window.NativeShell.downloadFile(item);
}); });
} else { } else {
multiDownload(items.map(function (item) { multiDownload(items.map(function (item) {

View file

@ -339,7 +339,9 @@ define(["apphost", "globalize", "connectionManager", "itemHelper", "appRouter",
fileDownloader.download([{ fileDownloader.download([{
url: downloadHref, url: downloadHref,
itemId: itemId, itemId: itemId,
serverId: serverId serverId: serverId,
title: item.Name,
filename: item.Path.replace(/^.*[\\\/]/, '')
}]); }]);
getResolveFunction(getResolveFunction(resolve, id), id)(); getResolveFunction(getResolveFunction(resolve, id), id)();
}); });