mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
proxy remote images through the server when previewing
This commit is contained in:
parent
92753817e3
commit
a5c7e0cb19
1 changed files with 13 additions and 3 deletions
|
@ -131,6 +131,10 @@
|
|||
});
|
||||
}
|
||||
|
||||
function getDisplayUrl(url) {
|
||||
return ApiClient.getUrl("Images/Remote", { url: url });
|
||||
}
|
||||
|
||||
function getRemoteImageHtml(image, imageType) {
|
||||
|
||||
var html = '';
|
||||
|
@ -152,9 +156,9 @@
|
|||
cssClass += currentItem.Type == "Episode" ? " remoteBackdropImage" : " remotePosterImage";
|
||||
}
|
||||
|
||||
var displayUrl = image.ThumbnailUrl || image.Url;
|
||||
|
||||
html += '<a target="_blank" href="' + image.Url + '" class="' + cssClass + '" style="background-image:url(\'' + displayUrl + '\');">';
|
||||
var displayUrl = getDisplayUrl(image.ThumbnailUrl || image.Url);
|
||||
|
||||
html += '<a target="_blank" href="' + getDisplayUrl(image.Url) + '" class="' + cssClass + '" style="background-image:url(\'' + displayUrl + '\');">';
|
||||
html += '</a>';
|
||||
|
||||
html += '<div class="remoteImageDetails">';
|
||||
|
@ -537,6 +541,9 @@
|
|||
$.mobile.urlHistory.ignoreNextHashChange = true;
|
||||
window.location.hash = 'editItemImagesPage?id=' + data.id;
|
||||
|
||||
browsableImageStartIndex = 0;
|
||||
browsableImageType = 'Primary';
|
||||
|
||||
reload(page);
|
||||
}
|
||||
});
|
||||
|
@ -567,6 +574,9 @@
|
|||
|
||||
reload(page);
|
||||
|
||||
browsableImageStartIndex = 0;
|
||||
browsableImageType = 'Primary';
|
||||
|
||||
$('#uploadImage', page).on("change", function () {
|
||||
setFiles(page, this.files);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue