aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/Library/LibraryService.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2017-06-11 16:40:25 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2017-06-11 16:40:25 -0400
commit65e8cf0726e17c00ff7882c1f31f64211c3a59c5 (patch)
treea05dc6b5ca0c165214adff09a3c0d8a30f11e7f6 /MediaBrowser.Api/Library/LibraryService.cs
parente56ef95283ce3d4ccacd0f65f45e26086da186d2 (diff)
improve live tv images
Diffstat (limited to 'MediaBrowser.Api/Library/LibraryService.cs')
-rw-r--r--MediaBrowser.Api/Library/LibraryService.cs11
1 files changed, 11 insertions, 0 deletions
diff --git a/MediaBrowser.Api/Library/LibraryService.cs b/MediaBrowser.Api/Library/LibraryService.cs
index 4112eb444..d9fc7143f 100644
--- a/MediaBrowser.Api/Library/LibraryService.cs
+++ b/MediaBrowser.Api/Library/LibraryService.cs
@@ -27,6 +27,7 @@ using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.IO;
using MediaBrowser.Model.Globalization;
using MediaBrowser.Model.Services;
+using MediaBrowser.Common.Extensions;
namespace MediaBrowser.Api.Library
{
@@ -830,6 +831,11 @@ namespace MediaBrowser.Api.Library
: (Folder)_libraryManager.RootFolder)
: _libraryManager.GetItemById(request.Id);
+ if (item == null)
+ {
+ throw new ResourceNotFoundException("Item not found.");
+ }
+
while (item.ThemeSongIds.Count == 0 && request.InheritFromParent && item.GetParent() != null)
{
item = item.GetParent();
@@ -874,6 +880,11 @@ namespace MediaBrowser.Api.Library
: (Folder)_libraryManager.RootFolder)
: _libraryManager.GetItemById(request.Id);
+ if (item == null)
+ {
+ throw new ResourceNotFoundException("Item not found.");
+ }
+
while (item.ThemeVideoIds.Count == 0 && request.InheritFromParent && item.GetParent() != null)
{
item = item.GetParent();