mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-27 04:21:27 +02:00
stop trying to load place holder image for placeholder when server is offline.
This commit is contained in:
@@ -4,7 +4,16 @@ define(
|
|||||||
[
|
[
|
||||||
'handlebars'
|
'handlebars'
|
||||||
], function (Handlebars) {
|
], function (Handlebars) {
|
||||||
|
|
||||||
|
var placeHolder = '/Content/Images/poster-dark.jpg';
|
||||||
|
|
||||||
|
window.NzbDrone.imageError = function (img) {
|
||||||
|
if (!img.src.contains(placeHolder)) {
|
||||||
|
img.src = placeHolder;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
Handlebars.registerHelper('defaultImg', function () {
|
Handlebars.registerHelper('defaultImg', function () {
|
||||||
return new Handlebars.SafeString('onerror=this.src=\'/Content/Images/poster-dark.jpg\';');
|
return new Handlebars.SafeString('onerror=window.NzbDrone.imageError(this)');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user