aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2016-03-12 22:30:23 -0500
committerLuke Pulverenti <luke.pulverenti@gmail.com>2016-03-12 22:30:23 -0500
commit146547b02e80b9224fa414238cd0e737c2a482d6 (patch)
tree9ff6e6da96fd164db612385fa41036d21fcaee32
parent24fcde7d917d3991bcdf51dde8fb4437bc378888 (diff)
add error handling to recording parsing
-rw-r--r--MediaBrowser.Api/TvShowsService.cs2
-rw-r--r--MediaBrowser.Server.Implementations/LiveTv/EmbyTV/ItemDataProvider.cs17
-rw-r--r--MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj3
3 files changed, 17 insertions, 5 deletions
diff --git a/MediaBrowser.Api/TvShowsService.cs b/MediaBrowser.Api/TvShowsService.cs
index 2dad9533f..2873dd8b4 100644
--- a/MediaBrowser.Api/TvShowsService.cs
+++ b/MediaBrowser.Api/TvShowsService.cs
@@ -273,7 +273,7 @@ namespace MediaBrowser.Api
{
var user = _userManager.GetUserById(request.UserId);
- var minPremiereDate = DateTime.Now.Date.AddDays(-1).ToUniversalTime();
+ var minPremiereDate = DateTime.Now.Date.ToUniversalTime();
var parentIds = string.IsNullOrWhiteSpace(request.ParentId) ? new string[] { } : new[] { request.ParentId };
diff --git a/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/ItemDataProvider.cs b/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/ItemDataProvider.cs
index 68b3f1f71..a4eb23d99 100644
--- a/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/ItemDataProvider.cs
+++ b/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/ItemDataProvider.cs
@@ -47,7 +47,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV
try
{
- return _jsonSerializer.DeserializeFromFile<List<T>>(jsonFile);
+ return _jsonSerializer.DeserializeFromFile<List<T>>(jsonFile) ?? new List<T>();
}
catch (FileNotFoundException)
{
@@ -69,6 +69,11 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV
private void UpdateList(List<T> newList)
{
+ if (newList == null)
+ {
+ throw new ArgumentNullException("newList");
+ }
+
var file = _dataPath + ".json";
_fileSystem.CreateDirectory(Path.GetDirectoryName(file));
@@ -81,6 +86,11 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV
public virtual void Update(T item)
{
+ if (item == null)
+ {
+ throw new ArgumentNullException("item");
+ }
+
var list = GetAll().ToList();
var index = list.FindIndex(i => EqualityComparer(i, item));
@@ -97,6 +107,11 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV
public virtual void Add(T item)
{
+ if (item == null)
+ {
+ throw new ArgumentNullException("item");
+ }
+
var list = GetAll().ToList();
if (list.Any(i => EqualityComparer(i, item)))
diff --git a/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj b/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj
index 5b8e2932a..74bc05fe8 100644
--- a/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj
+++ b/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj
@@ -341,9 +341,6 @@
<Content Include="dashboard-ui\components\sharingwidget.js">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
- <Content Include="dashboard-ui\scripts\slideshow.js">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </Content>
<Content Include="dashboard-ui\scripts\supporterkeypage.js">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>