mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-14 02:26:55 -07:00
This commit is contained in:
parent
17502d695b
commit
1067b9afd7
10 changed files with 237 additions and 25 deletions
|
@ -66,7 +66,7 @@ namespace PlexRequests.UI.Helpers
|
|||
var assetLocation = GetBaseUrl();
|
||||
|
||||
var content = GetContentUrl(assetLocation);
|
||||
var settings = GetSettings();
|
||||
var settings = GetCustomizationSettings();
|
||||
if (string.IsNullOrEmpty(settings.ThemeName))
|
||||
{
|
||||
settings.ThemeName = Themes.PlexTheme;
|
||||
|
@ -328,6 +328,11 @@ namespace PlexRequests.UI.Helpers
|
|||
return helper.Raw(GetBaseUrl());
|
||||
}
|
||||
|
||||
public static IHtmlString GetApplicationName(this HtmlHelpers helper)
|
||||
{
|
||||
return helper.Raw(GetCustomizationSettings().ApplicationName);
|
||||
}
|
||||
|
||||
private static string GetBaseUrl()
|
||||
{
|
||||
return GetSettings().BaseUrl;
|
||||
|
@ -343,6 +348,16 @@ namespace PlexRequests.UI.Helpers
|
|||
return returnValue;
|
||||
}
|
||||
|
||||
private static CustomizationSettings GetCustomizationSettings()
|
||||
{
|
||||
var returnValue = Cache.GetOrSet(CacheKeys.GetPlexRequestSettings, () =>
|
||||
{
|
||||
var settings = Locator.Resolve<ISettingsService<CustomizationSettings>>().GetSettings();
|
||||
return settings;
|
||||
});
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
private static string GetLinkUrl(string assetLocation)
|
||||
{
|
||||
return string.IsNullOrEmpty(assetLocation) ? string.Empty : $"{assetLocation}";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue