aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations
diff options
context:
space:
mode:
Diffstat (limited to 'Emby.Server.Implementations')
-rw-r--r--Emby.Server.Implementations/Collections/CollectionManager.cs5
-rw-r--r--Emby.Server.Implementations/Library/LibraryManager.cs5
-rw-r--r--Emby.Server.Implementations/Playlists/PlaylistManager.cs5
3 files changed, 15 insertions, 0 deletions
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");
diff --git a/Emby.Server.Implementations/Library/LibraryManager.cs b/Emby.Server.Implementations/Library/LibraryManager.cs
index 94bd4e0d4..42eda00b7 100644
--- a/Emby.Server.Implementations/Library/LibraryManager.cs
+++ b/Emby.Server.Implementations/Library/LibraryManager.cs
@@ -864,6 +864,11 @@ namespace Emby.Server.Implementations.Library
// If this returns multiple items it could be tricky figuring out which one is correct.
// In most cases, the newest one will be and the others obsolete but not yet cleaned up
+ if (string.IsNullOrWhiteSpace(path))
+ {
+ throw new ArgumentNullException("path");
+ }
+
var query = new InternalItemsQuery
{
Path = path,
diff --git a/Emby.Server.Implementations/Playlists/PlaylistManager.cs b/Emby.Server.Implementations/Playlists/PlaylistManager.cs
index 474ef0f53..e0e133e38 100644
--- a/Emby.Server.Implementations/Playlists/PlaylistManager.cs
+++ b/Emby.Server.Implementations/Playlists/PlaylistManager.cs
@@ -198,6 +198,11 @@ namespace Emby.Server.Implementations.Playlists
foreach (var item in items)
{
+ if (string.IsNullOrWhiteSpace(item.Path))
+ {
+ continue;
+ }
+
list.Add(LinkedChild.Create(item));
}