diff --git a/MediaBrowser.Model/Entities/VirtualFolderInfo.cs b/MediaBrowser.Model/Entities/VirtualFolderInfo.cs index b7f92e9ec..1161ab005 100644 --- a/MediaBrowser.Model/Entities/VirtualFolderInfo.cs +++ b/MediaBrowser.Model/Entities/VirtualFolderInfo.cs @@ -33,6 +33,12 @@ namespace MediaBrowser.Model.Entities Locations = new List(); } + /// + /// Gets or sets the item identifier. + /// + /// The item identifier. + public string ItemId { get; set; } + /// /// Gets or sets the primary image item identifier. /// diff --git a/MediaBrowser.Providers/Folders/DefaultImageProvider.cs b/MediaBrowser.Providers/Folders/DefaultImageProvider.cs index 114346191..270867f90 100644 --- a/MediaBrowser.Providers/Folders/DefaultImageProvider.cs +++ b/MediaBrowser.Providers/Folders/DefaultImageProvider.cs @@ -142,10 +142,17 @@ namespace MediaBrowser.Providers.Folders if (view != null) { - return true; + return !string.IsNullOrWhiteSpace(GetImageUrl(view.ViewType)); } - return item is ICollectionFolder; + var folder = item as ICollectionFolder; + + if (folder != null) + { + return !string.IsNullOrWhiteSpace(GetImageUrl(folder.CollectionType)); + } + + return false; } public Task GetImageResponse(string url, CancellationToken cancellationToken) diff --git a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs index eff05ba73..0156a46a9 100644 --- a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs +++ b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs @@ -1198,6 +1198,11 @@ namespace MediaBrowser.Server.Implementations.Library info.PrimaryImageItemId = libraryFolder.Id.ToString("N"); } + if (libraryFolder != null) + { + info.ItemId = libraryFolder.Id.ToString("N"); + } + return info; }