#1464 added the Plex episode cacher

#865
This commit is contained in:
Jamie.Rees 2017-08-23 16:00:13 +01:00
parent bf043fc76e
commit 0e6462bbd5
31 changed files with 410 additions and 33 deletions

View file

@ -1,4 +1,5 @@
using System.Collections.Generic;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
@ -50,6 +51,10 @@ namespace Ombi.Store.Repository
public GlobalSettings Get(string pageName)
{
var entity = Db.Settings.FirstOrDefault(x => x.SettingsName == pageName);
if (entity == null)
{
throw new ArgumentNullException($"The setting {pageName} does not exist");
}
Db.Entry(entity).Reload();
return entity;
}