mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2026-04-20 22:14:34 -04:00
New: Support for running from a sub folder (reverse proxy)
This commit is contained in:
@@ -2,10 +2,11 @@
|
||||
|
||||
define(
|
||||
[
|
||||
'handlebars'
|
||||
], function (Handlebars) {
|
||||
'handlebars',
|
||||
'System/StatusModel'
|
||||
], function (Handlebars, StatusModel) {
|
||||
|
||||
var placeHolder = '/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)) {
|
||||
@@ -17,4 +18,8 @@ define(
|
||||
Handlebars.registerHelper('defaultImg', function () {
|
||||
return new Handlebars.SafeString('onerror=window.NzbDrone.imageError(this)');
|
||||
});
|
||||
|
||||
Handlebars.registerHelper('UrlBase', function () {
|
||||
return new Handlebars.SafeString(StatusModel.get('urlBase'));
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user