Fixed: Show title on posters view when poster is unavailable

This commit is contained in:
Mark McDowall
2014-02-07 21:05:52 -08:00
parent c3eb9a7a8c
commit fcd05cda60
4 changed files with 27 additions and 27 deletions

View File

@@ -2,15 +2,17 @@
define(
[
'jquery',
'handlebars',
'System/StatusModel'
], function (Handlebars, StatusModel) {
], function ($, Handlebars, StatusModel) {
var placeHolder = StatusModel.get('urlBase') + '/Content/Images/poster-dark.jpg';
var placeholder = StatusModel.get('urlBase') + '/Content/Images/poster-dark.jpg';
window.NzbDrone.imageError = function (img) {
if (!img.src.contains(placeHolder)) {
img.src = placeHolder;
if (!img.src.contains(placeholder)) {
img.src = placeholder;
$(img).addClass('placeholder-image');
}
img.onerror = null;
};