diff options
Diffstat (limited to 'MediaBrowser.Server.Implementations')
4 files changed, 4 insertions, 25 deletions
diff --git a/MediaBrowser.Server.Implementations/EntryPoints/LibraryChangedNotifier.cs b/MediaBrowser.Server.Implementations/EntryPoints/LibraryChangedNotifier.cs index 7dacfacc2..a91033839 100644 --- a/MediaBrowser.Server.Implementations/EntryPoints/LibraryChangedNotifier.cs +++ b/MediaBrowser.Server.Implementations/EntryPoints/LibraryChangedNotifier.cs @@ -273,8 +273,7 @@ namespace MediaBrowser.Server.Implementations.EntryPoints { if (item.LocationType == LocationType.FileSystem) { - return collections.Where(i => i.LocationType == LocationType.FileSystem && - i.PhysicalLocations.Contains(item.Path)).Cast<T>(); + return collections.Where(i => i.PhysicalLocations.Contains(item.Path)).Cast<T>(); } } @@ -283,7 +282,7 @@ namespace MediaBrowser.Server.Implementations.EntryPoints { if (item.Id == user.RootFolder.Id) { - return new T[] { item }; + return new[] { item }; } return new T[] { }; diff --git a/MediaBrowser.Server.Implementations/IO/LibraryMonitor.cs b/MediaBrowser.Server.Implementations/IO/LibraryMonitor.cs index f1f9048a9..8634919fc 100644 --- a/MediaBrowser.Server.Implementations/IO/LibraryMonitor.cs +++ b/MediaBrowser.Server.Implementations/IO/LibraryMonitor.cs @@ -161,7 +161,6 @@ namespace MediaBrowser.Server.Implementations.IO .RootFolder .Children .OfType<Folder>() - .Where(i => i.LocationType != LocationType.Remote && i.LocationType != LocationType.Virtual) .SelectMany(f => f.PhysicalLocations) .Distinct(StringComparer.OrdinalIgnoreCase) .OrderBy(i => i) diff --git a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs index 92d7a4a90..d4da9dbe7 100644 --- a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs +++ b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs @@ -1399,22 +1399,7 @@ namespace MediaBrowser.Server.Implementations.Library .Distinct() .SelectMany(i => i.Children) .OfType<CollectionFolder>() - .Where(i => - { - var locationType = i.LocationType; - - if (locationType == LocationType.Remote || locationType == LocationType.Virtual) - { - return false; - } - - if (string.Equals(i.Path, item.Path, StringComparison.OrdinalIgnoreCase)) - { - return true; - } - - return i.PhysicalLocations.Contains(item.Path); - }) + .Where(i => string.Equals(i.Path, item.Path, StringComparison.OrdinalIgnoreCase) || i.PhysicalLocations.Contains(item.Path)) .Select(i => i.CollectionType) .Where(i => !string.IsNullOrEmpty(i)) .Distinct() diff --git a/MediaBrowser.Server.Implementations/Session/SessionManager.cs b/MediaBrowser.Server.Implementations/Session/SessionManager.cs index fd78d1aaa..09a442966 100644 --- a/MediaBrowser.Server.Implementations/Session/SessionManager.cs +++ b/MediaBrowser.Server.Implementations/Session/SessionManager.cs @@ -615,13 +615,9 @@ namespace MediaBrowser.Server.Implementations.Session } var items = command.ItemIds.Select(i => _libraryManager.GetItemById(new Guid(i))) + .Where(i => i.LocationType != LocationType.Virtual) .ToList(); - if (items.Any(i => i.LocationType == LocationType.Virtual)) - { - throw new ArgumentException("Virtual items are not playable."); - } - if (command.PlayCommand != PlayCommand.PlayNow) { if (items.Any(i => !session.QueueableMediaTypes.Contains(i.MediaType, StringComparer.OrdinalIgnoreCase))) |
