From d8ec7109ab5ec561254465e1664974049cc556d7 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Tue, 30 May 2017 14:24:50 -0400 Subject: add FindByPath error handling --- Emby.Server.Implementations/Collections/CollectionManager.cs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Emby.Server.Implementations/Collections/CollectionManager.cs') diff --git a/Emby.Server.Implementations/Collections/CollectionManager.cs b/Emby.Server.Implementations/Collections/CollectionManager.cs index 9c26655fc..4e5d344a3 100644 --- a/Emby.Server.Implementations/Collections/CollectionManager.cs +++ b/Emby.Server.Implementations/Collections/CollectionManager.cs @@ -170,6 +170,11 @@ namespace Emby.Server.Implementations.Collections { var item = _libraryManager.GetItemById(itemId); + if (string.IsNullOrWhiteSpace(item.Path)) + { + continue; + } + if (item == null) { throw new ArgumentException("No item exists with the supplied Id"); -- cgit v1.2.3