From ecc6fcfbab7006c7c9bfcf76d329c663a2fa5a2c Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Fri, 3 Jan 2014 15:32:27 -0500 Subject: add custom collection sort orders to edit page --- MediaBrowser.Controller/Entities/Video.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'MediaBrowser.Controller/Entities/Video.cs') diff --git a/MediaBrowser.Controller/Entities/Video.cs b/MediaBrowser.Controller/Entities/Video.cs index 19cad79482..8ca4756509 100644 --- a/MediaBrowser.Controller/Entities/Video.cs +++ b/MediaBrowser.Controller/Entities/Video.cs @@ -238,7 +238,7 @@ namespace MediaBrowser.Controller.Entities if (string.IsNullOrEmpty(parentPath)) { - throw new ApplicationException("Unable to get parent path info from " + path); + throw new IOException("Unable to get parent path info from " + path); } files = new DirectoryInfo(parentPath) @@ -247,7 +247,14 @@ namespace MediaBrowser.Controller.Entities } else { - files = ResolveArgs.FileSystemChildren.Where(i => + var resolveArgs = ResolveArgs; + + if (resolveArgs == null) + { + throw new IOException("ResolveArgs are null for " + path); + } + + files = resolveArgs.FileSystemChildren.Where(i => { if ((i.Attributes & FileAttributes.Directory) == FileAttributes.Directory) { -- cgit v1.2.3