diff --git a/MediaBrowser.LocalMetadata/Images/LocalImageProvider.cs b/MediaBrowser.LocalMetadata/Images/LocalImageProvider.cs index 8ae20f604..f147f1d61 100644 --- a/MediaBrowser.LocalMetadata/Images/LocalImageProvider.cs +++ b/MediaBrowser.LocalMetadata/Images/LocalImageProvider.cs @@ -268,7 +268,7 @@ namespace MediaBrowser.LocalMetadata.Images { var imageFiles = _fileSystem.GetFiles(path, BaseItem.SupportedImageExtensions, false, false); - images.AddRange(imageFiles.Select(i => new LocalImageInfo + images.AddRange(imageFiles.Where(i => i.Length > 0).Select(i => new LocalImageInfo { FileInfo = i, Type = ImageType.Backdrop @@ -398,7 +398,7 @@ namespace MediaBrowser.LocalMetadata.Images private FileSystemMetadata GetImage(IEnumerable files, string name) { - return files.FirstOrDefault(i => !i.IsDirectory && string.Equals(name, _fileSystem.GetFileNameWithoutExtension(i), StringComparison.OrdinalIgnoreCase)); + return files.FirstOrDefault(i => !i.IsDirectory && string.Equals(name, _fileSystem.GetFileNameWithoutExtension(i), StringComparison.OrdinalIgnoreCase) && i.Length > 0); } } }