Merge branch 'develop' of https://github.com/tidusjar/Ombi into develop

pull/2194/head
Jamie Rees 7 years ago
commit bb1795345b

@ -90,10 +90,20 @@ O:::::::OOO:::::::Om::::m m::::m m::::mb:::::bbbbbb::::::bi::::::i
if (customization.HasPresetTheme) if (customization.HasPresetTheme)
{ {
if (!string.IsNullOrEmpty(baseUrl)) if (!string.IsNullOrEmpty(baseUrl))
{
if (!customization.PresetThemeContent.Contains("/" + baseUrl))
{ {
var index = customization.PresetThemeContent.IndexOf("/api/"); var index = customization.PresetThemeContent.IndexOf("/api/");
customization.PresetThemeContent = customization.PresetThemeContent.Insert(index, "/" + baseUrl); customization.PresetThemeContent = customization.PresetThemeContent.Insert(index, "/" + baseUrl);
} else
{
var startIndex = customization.PresetThemeContent.IndexOf("href=");
var index = customization.PresetThemeContent.IndexOf("/api/");
customization.PresetThemeContent = customization.PresetThemeContent.Remove(startIndex+6, (index-(startIndex+6)));
index = customization.PresetThemeContent.IndexOf("/api/");
customization.PresetThemeContent = customization.PresetThemeContent.Insert(index, "/" + baseUrl);
} }
}
<style> <style>
@Html.Raw(customization.PresetThemeContent) @Html.Raw(customization.PresetThemeContent)

Loading…
Cancel
Save