mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-18 03:18:19 -07:00
update download function
This commit is contained in:
parent
d6c9993abe
commit
e65500d84e
@ -463,7 +463,7 @@ body:not(.dashboardDocument) .btnNotifications {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.adminDrawerLogo {
|
.adminDrawerLogo {
|
||||||
padding: 15px 1em;
|
padding: 1.5em 1em 1.2em;
|
||||||
border-bottom: 1px solid #e0e0e0;
|
border-bottom: 1px solid #e0e0e0;
|
||||||
margin-bottom: 1em;
|
margin-bottom: 1em;
|
||||||
display: block;
|
display: block;
|
||||||
|
@ -981,10 +981,17 @@
|
|||||||
break;
|
break;
|
||||||
case 'download':
|
case 'download':
|
||||||
{
|
{
|
||||||
|
require(['fileDownloader'], function (fileDownloader) {
|
||||||
|
|
||||||
var downloadHref = ApiClient.getUrl("Items/" + itemId + "/Download", {
|
var downloadHref = ApiClient.getUrl("Items/" + itemId + "/Download", {
|
||||||
api_key: ApiClient.accessToken()
|
api_key: ApiClient.accessToken()
|
||||||
});
|
});
|
||||||
window.location.href = downloadHref;
|
|
||||||
|
fileDownloader([{
|
||||||
|
url: downloadHref,
|
||||||
|
itemId: itemId
|
||||||
|
}]);
|
||||||
|
});
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -479,7 +479,6 @@
|
|||||||
case 'download':
|
case 'download':
|
||||||
{
|
{
|
||||||
require(['fileDownloader'], function (fileDownloader) {
|
require(['fileDownloader'], function (fileDownloader) {
|
||||||
|
|
||||||
var downloadHref = ApiClient.getUrl("Items/" + itemId + "/Download", {
|
var downloadHref = ApiClient.getUrl("Items/" + itemId + "/Download", {
|
||||||
api_key: ApiClient.accessToken()
|
api_key: ApiClient.accessToken()
|
||||||
});
|
});
|
||||||
|
@ -469,7 +469,7 @@
|
|||||||
//html += '</div>';
|
//html += '</div>';
|
||||||
//html += '</div>';
|
//html += '</div>';
|
||||||
|
|
||||||
html += '<a class="adminDrawerLogo clearLink" href="dashboard.html">'
|
html += '<a class="adminDrawerLogo clearLink" href="home.html">'
|
||||||
html += '<img src="css/images/logo.png" />';
|
html += '<img src="css/images/logo.png" />';
|
||||||
html += '</a>'
|
html += '</a>'
|
||||||
|
|
||||||
|
@ -2120,9 +2120,9 @@ var AppInfo = {};
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (Dashboard.isRunningInCordova() && browser.android) {
|
if (Dashboard.isRunningInCordova() && browser.android) {
|
||||||
define("fileDownloader", 'components/filedownloader', returnFirstDependency);
|
define("fileDownloader", ['cordova/android/filedownloader'], returnFirstDependency);
|
||||||
} else {
|
} else {
|
||||||
define("fileDownloader", 'cordova/android/filedownloader', returnFirstDependency);
|
define("fileDownloader", ['components/filedownloader'], returnFirstDependency);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user