Skip to content

Commit de80b8f

Browse files
add error handling to recording parsing
1 parent 0e92351 commit de80b8f

File tree

6 files changed

+23
-10
lines changed

6 files changed

+23
-10
lines changed

MediaBrowser.Api/TvShowsService.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ public object Get(GetUpcomingEpisodes request)
273273
{
274274
var user = _userManager.GetUserById(request.UserId);
275275

276-
var minPremiereDate = DateTime.Now.Date.AddDays(-1).ToUniversalTime();
276+
var minPremiereDate = DateTime.Now.Date.ToUniversalTime();
277277

278278
var parentIds = string.IsNullOrWhiteSpace(request.ParentId) ? new string[] { } : new[] { request.ParentId };
279279

MediaBrowser.Server.Implementations/LiveTv/EmbyTV/ItemDataProvider.cs

+16-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ private List<T> GetItemsFromFile(string path)
4747

4848
try
4949
{
50-
return _jsonSerializer.DeserializeFromFile<List<T>>(jsonFile);
50+
return _jsonSerializer.DeserializeFromFile<List<T>>(jsonFile) ?? new List<T>();
5151
}
5252
catch (FileNotFoundException)
5353
{
@@ -69,6 +69,11 @@ private List<T> GetItemsFromFile(string path)
6969

7070
private void UpdateList(List<T> newList)
7171
{
72+
if (newList == null)
73+
{
74+
throw new ArgumentNullException("newList");
75+
}
76+
7277
var file = _dataPath + ".json";
7378
_fileSystem.CreateDirectory(Path.GetDirectoryName(file));
7479

@@ -81,6 +86,11 @@ private void UpdateList(List<T> newList)
8186

8287
public virtual void Update(T item)
8388
{
89+
if (item == null)
90+
{
91+
throw new ArgumentNullException("item");
92+
}
93+
8494
var list = GetAll().ToList();
8595

8696
var index = list.FindIndex(i => EqualityComparer(i, item));
@@ -97,6 +107,11 @@ public virtual void Update(T item)
97107

98108
public virtual void Add(T item)
99109
{
110+
if (item == null)
111+
{
112+
throw new ArgumentNullException("item");
113+
}
114+
100115
var list = GetAll().ToList();
101116

102117
if (list.Any(i => EqualityComparer(i, item)))

MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj

-3
Original file line numberDiff line numberDiff line change
@@ -341,9 +341,6 @@
341341
<Content Include="dashboard-ui\components\sharingwidget.js">
342342
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
343343
</Content>
344-
<Content Include="dashboard-ui\scripts\slideshow.js">
345-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
346-
</Content>
347344
<Content Include="dashboard-ui\scripts\supporterkeypage.js">
348345
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
349346
</Content>

MediaBrowser.WebDashboard/dashboard-ui/css/card.css

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,14 @@
4747
margin: 4px;
4848
}
4949

50-
@media all and (max-width: 600px) {
50+
@media all and (max-width: 500px) {
5151

5252
.cardBox {
5353
margin: 1px;
5454
}
5555
}
5656

57-
@media all and (min-width: 800px) {
57+
@media all and (min-width: 500px) {
5858

5959
.cardImage {
6060
border-radius: 3px;

MediaBrowser.WebDashboard/dashboard-ui/css/site.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ html {
278278
margin: 0;
279279
padding: 0;
280280
height: 100%;
281-
font-family: 'San Francisco', 'Helvetica Neue', 'Open Sans', 'Segoe UI', sans-serif;
281+
font-family: 'San Francisco', 'Helvetica Neue', Roboto, 'Open Sans', 'Segoe UI', sans-serif;
282282
font-size: 14px;
283283
}
284284

MediaBrowser.WebDashboard/dashboard-ui/scripts/site.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -2310,9 +2310,10 @@ var AppInfo = {};
23102310

23112311
postInitDependencies.push('components/remotecontrolautoplay');
23122312

2313-
// Prefer OpenSans over Segoe if on desktop windows
2313+
// Prefer custom font over Segoe if on desktop windows
23142314
if (!browserInfo.mobile && navigator.userAgent.toLowerCase().indexOf('windows') != -1) {
2315-
postInitDependencies.push('opensansFont');
2315+
//postInitDependencies.push('opensansFont');
2316+
postInitDependencies.push('robotoFont');
23162317
}
23172318

23182319
require(postInitDependencies);

0 commit comments

Comments
 (0)