From 540b904ebaecdc935cb622ebf2e2cf87162fa3fe Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 6 Jul 2013 19:08:32 -0400 Subject: have some endpoints throw exceptions for offline items --- MediaBrowser.Api/LibraryService.cs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'MediaBrowser.Api/LibraryService.cs') diff --git a/MediaBrowser.Api/LibraryService.cs b/MediaBrowser.Api/LibraryService.cs index 4042c7c24..17a448c3d 100644 --- a/MediaBrowser.Api/LibraryService.cs +++ b/MediaBrowser.Api/LibraryService.cs @@ -226,6 +226,11 @@ namespace MediaBrowser.Api var parent = item.Parent; + if (item.LocationType == LocationType.Offline) + { + throw new InvalidOperationException(string.Format("{0} is currently offline.", item.Name)); + } + if (item.LocationType == LocationType.FileSystem) { if (Directory.Exists(item.Path)) -- cgit v1.2.3