diff --git a/src/Ombi.Notifications.Templates/INewsletterTemplate.cs b/src/Ombi.Notifications.Templates/INewsletterTemplate.cs index 620cf3999..11d0e7431 100644 --- a/src/Ombi.Notifications.Templates/INewsletterTemplate.cs +++ b/src/Ombi.Notifications.Templates/INewsletterTemplate.cs @@ -2,6 +2,6 @@ { public interface INewsletterTemplate { - string LoadTemplate(string subject, string intro, string tableHtml, string logo, string unsubscribeLink); + string LoadTemplate(string subject, string intro, string tableHtml, string logo, string unsubscribeLink, string applicationUrl); } -} \ No newline at end of file +} diff --git a/src/Ombi.Notifications.Templates/NewsletterTemplate.cs b/src/Ombi.Notifications.Templates/NewsletterTemplate.cs index 9d3b1632a..d83197d24 100644 --- a/src/Ombi.Notifications.Templates/NewsletterTemplate.cs +++ b/src/Ombi.Notifications.Templates/NewsletterTemplate.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.IO; using System.Text; using Ombi.I18n.Resources; @@ -27,6 +27,7 @@ namespace Ombi.Notifications.Templates private const string SubjectKey = "{@SUBJECT}"; private const string DateKey = "{@DATENOW}"; + private const string AppUrl = "{@APPURL}"; private const string Logo = "{@LOGO}"; private const string TableLocation = "{@RECENTLYADDED}"; private const string IntroText = "{@INTRO}"; @@ -35,13 +36,14 @@ namespace Ombi.Notifications.Templates private const string PoweredByText = "{@POWEREDBYTEXT}"; - public string LoadTemplate(string subject, string intro, string tableHtml, string logo, string unsubscribeLink) + public string LoadTemplate(string subject, string intro, string tableHtml, string logo, string unsubscribeLink, string applicationUrl) { var sb = new StringBuilder(File.ReadAllText(TemplateLocation)); sb.Replace(SubjectKey, subject); sb.Replace(TableLocation, tableHtml); sb.Replace(IntroText, intro); sb.Replace(DateKey, DateTime.Now.ToString("f")); + sb.Replace(AppUrl, applicationUrl); sb.Replace(Logo, string.IsNullOrEmpty(logo) ? OmbiLogo : logo); sb.Replace(Unsubscribe, string.IsNullOrEmpty(unsubscribeLink) ? string.Empty : unsubscribeLink); sb.Replace(UnsubscribeText, string.IsNullOrEmpty(unsubscribeLink) ? string.Empty : Texts.Unsubscribe); diff --git a/src/Ombi.Notifications.Templates/Templates/NewsletterTemplate.html b/src/Ombi.Notifications.Templates/Templates/NewsletterTemplate.html index fdafdb609..12be6b5c4 100644 --- a/src/Ombi.Notifications.Templates/Templates/NewsletterTemplate.html +++ b/src/Ombi.Notifications.Templates/Templates/NewsletterTemplate.html @@ -428,7 +428,7 @@