mirror of
https://github.com/lidarr/Lidarr
synced 2024-12-25 17:17:02 +00:00
stop trying to load place holder image for placeholder when server is offline.
This commit is contained in:
parent
27c57612f4
commit
b07bc713bb
1 changed files with 10 additions and 1 deletions
|
@ -4,7 +4,16 @@ define(
|
|||
[
|
||||
'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 () {
|
||||
return new Handlebars.SafeString('onerror=this.src=\'/Content/Images/poster-dark.jpg\';');
|
||||
return new Handlebars.SafeString('onerror=window.NzbDrone.imageError(this)');
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue