mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-13 16:43:58 -07:00
New: Support for running from a sub folder (reverse proxy)
This commit is contained in:
parent
cec479923f
commit
b5c9a811dd
22 changed files with 161 additions and 89 deletions
|
@ -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'));
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue