From a6ca902479a1706b1ff914847b8515fe3c4aebe3 Mon Sep 17 00:00:00 2001 From: tidusjar Date: Sat, 11 Nov 2017 23:03:50 +0000 Subject: [PATCH] Fixed #1705 --- .../Ombi.Notifications.csproj | 2 +- .../Repository/SettingsJsonRepository.cs | 28 +++++++++---------- .../notificationtemplate.component.html | 4 ++- .../notificationtemplate.component.ts | 19 ------------- .../app/settings/wiki.component.html | 14 ++++++++-- .../ClientApp/app/settings/wiki.component.ts | 1 + 6 files changed, 31 insertions(+), 37 deletions(-) diff --git a/src/Ombi.Notifications/Ombi.Notifications.csproj b/src/Ombi.Notifications/Ombi.Notifications.csproj index 48bba1c2c..f415045d6 100644 --- a/src/Ombi.Notifications/Ombi.Notifications.csproj +++ b/src/Ombi.Notifications/Ombi.Notifications.csproj @@ -10,7 +10,7 @@ - + diff --git a/src/Ombi.Store/Repository/SettingsJsonRepository.cs b/src/Ombi.Store/Repository/SettingsJsonRepository.cs index 92ce05337..f6ebfec71 100644 --- a/src/Ombi.Store/Repository/SettingsJsonRepository.cs +++ b/src/Ombi.Store/Repository/SettingsJsonRepository.cs @@ -22,7 +22,7 @@ namespace Ombi.Store.Repository public GlobalSettings Insert(GlobalSettings entity) { - _cache.Remove(GetName(entity.SettingsName)); + //_cache.Remove(GetName(entity.SettingsName)); var settings = Db.Settings.Add(entity); Db.SaveChanges(); return settings.Entity; @@ -30,7 +30,7 @@ namespace Ombi.Store.Repository public async Task InsertAsync(GlobalSettings entity) { - _cache.Remove(GetName(entity.SettingsName)); + //_cache.Remove(GetName(entity.SettingsName)); var settings = await Db.Settings.AddAsync(entity).ConfigureAwait(false); await Db.SaveChangesAsync().ConfigureAwait(false); return settings.Entity; @@ -39,48 +39,48 @@ namespace Ombi.Store.Repository public GlobalSettings Get(string pageName) { - return _cache.GetOrCreate(GetName(pageName), entry => - { - entry.AbsoluteExpiration = DateTimeOffset.Now.AddHours(1); + //return _cache.GetOrCreate(GetName(pageName), entry => + //{ + // entry.AbsoluteExpiration = DateTimeOffset.Now.AddHours(1); var entity = Db.Settings.AsNoTracking().FirstOrDefault(x => x.SettingsName == pageName); return entity; - }); + //}); } public async Task GetAsync(string settingsName) { - return await _cache.GetOrCreateAsync(GetName(settingsName), async entry => - { - entry.AbsoluteExpiration = DateTimeOffset.Now.AddHours(1); + //return await _cache.GetOrCreateAsync(GetName(settingsName), async entry => + //{ + //entry.AbsoluteExpiration = DateTimeOffset.Now.AddHours(1); var obj = await Db.Settings.AsNoTracking().FirstOrDefaultAsync(x => x.SettingsName == settingsName); return obj; - }); + //}); } public async Task DeleteAsync(GlobalSettings entity) { - _cache.Remove(GetName(entity.SettingsName)); + //_cache.Remove(GetName(entity.SettingsName)); Db.Settings.Remove(entity); await Db.SaveChangesAsync(); } public async Task UpdateAsync(GlobalSettings entity) { - _cache.Remove(GetName(entity.SettingsName)); + //_cache.Remove(GetName(entity.SettingsName)); Db.Update(entity); await Db.SaveChangesAsync(); } public void Delete(GlobalSettings entity) { - _cache.Remove(GetName(entity.SettingsName)); + //_cache.Remove(GetName(entity.SettingsName)); Db.Settings.Remove(entity); Db.SaveChanges(); } public void Update(GlobalSettings entity) { - _cache.Remove(GetName(entity.SettingsName)); + //_cache.Remove(GetName(entity.SettingsName)); Db.SaveChanges(); } diff --git a/src/Ombi/ClientApp/app/settings/notifications/notificationtemplate.component.html b/src/Ombi/ClientApp/app/settings/notifications/notificationtemplate.component.html index 643a0471f..135642b38 100644 --- a/src/Ombi/ClientApp/app/settings/notifications/notificationtemplate.component.html +++ b/src/Ombi/ClientApp/app/settings/notifications/notificationtemplate.component.html @@ -1,4 +1,6 @@ - + + +

diff --git a/src/Ombi/ClientApp/app/settings/notifications/notificationtemplate.component.ts b/src/Ombi/ClientApp/app/settings/notifications/notificationtemplate.component.ts index 7ee63323d..b885d9f27 100644 --- a/src/Ombi/ClientApp/app/settings/notifications/notificationtemplate.component.ts +++ b/src/Ombi/ClientApp/app/settings/notifications/notificationtemplate.component.ts @@ -9,23 +9,4 @@ import { INotificationTemplates, NotificationType } from "../../interfaces"; export class NotificationTemplate { @Input() public templates: INotificationTemplates[]; public NotificationType = NotificationType; - - public helpText = ` -{RequestedUser} : The User who requested the content
-{RequestedDate} : The Date the media was requested
-{Title} : The title of the request e.g. Lion King
-{Type} : The request type e.g. Movie/Tv Show
-{Overview} : Overview of the requested item
-{Year} : The release year of the request
-{EpisodesList} : A comma seperated list of Episodes requested
-{SeasonsList} : A comma seperated list of seasons requested
-{PosterImage} : The requested poster image link
-{ApplicationName} : The Application Name from the Customization Settings -{ApplicationUrl} : The Application URL from the Customization Settings -{LongDate} : 15 June 2017
-{ShortDate} : 15/06/2017
-{LongTime} : 16:02:34
-{ShortTime} : 16:02
- -`; } diff --git a/src/Ombi/ClientApp/app/settings/wiki.component.html b/src/Ombi/ClientApp/app/settings/wiki.component.html index bcc476394..d93fdb2b7 100644 --- a/src/Ombi/ClientApp/app/settings/wiki.component.html +++ b/src/Ombi/ClientApp/app/settings/wiki.component.html @@ -1,5 +1,15 @@ 
- \ No newline at end of file diff --git a/src/Ombi/ClientApp/app/settings/wiki.component.ts b/src/Ombi/ClientApp/app/settings/wiki.component.ts index a5ca4c5c6..d2187bb8a 100644 --- a/src/Ombi/ClientApp/app/settings/wiki.component.ts +++ b/src/Ombi/ClientApp/app/settings/wiki.component.ts @@ -6,4 +6,5 @@ }) export class WikiComponent { @Input() public url: string; + @Input() public text: string; }