aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Providers/MediaInfo/VideoImageProvider.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Providers/MediaInfo/VideoImageProvider.cs')
-rw-r--r--MediaBrowser.Providers/MediaInfo/VideoImageProvider.cs21
1 files changed, 19 insertions, 2 deletions
diff --git a/MediaBrowser.Providers/MediaInfo/VideoImageProvider.cs b/MediaBrowser.Providers/MediaInfo/VideoImageProvider.cs
index 7f55ce1ac..59db382ea 100644
--- a/MediaBrowser.Providers/MediaInfo/VideoImageProvider.cs
+++ b/MediaBrowser.Providers/MediaInfo/VideoImageProvider.cs
@@ -1,5 +1,6 @@
using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.Entities;
+using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.MediaEncoding;
using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.Drawing;
@@ -18,12 +19,14 @@ namespace MediaBrowser.Providers.MediaInfo
private readonly IIsoManager _isoManager;
private readonly IMediaEncoder _mediaEncoder;
private readonly IServerConfigurationManager _config;
+ private readonly ILibraryManager _libraryManager;
- public VideoImageProvider(IIsoManager isoManager, IMediaEncoder mediaEncoder, IServerConfigurationManager config)
+ public VideoImageProvider(IIsoManager isoManager, IMediaEncoder mediaEncoder, IServerConfigurationManager config, ILibraryManager libraryManager)
{
_isoManager = isoManager;
_mediaEncoder = mediaEncoder;
_config = config;
+ _libraryManager = libraryManager;
}
/// <summary>
@@ -123,7 +126,21 @@ namespace MediaBrowser.Providers.MediaInfo
{
var video = item as Video;
- return item.LocationType == LocationType.FileSystem && video != null && !video.IsPlaceHolder && !video.IsShortcut && !video.IsArchive;
+ if (item.LocationType == LocationType.FileSystem && video != null && !video.IsPlaceHolder &&
+ !video.IsShortcut && !video.IsArchive)
+ {
+ if (video.GetType() == typeof(Video))
+ {
+ if (string.IsNullOrEmpty(_libraryManager.GetContentType(video)))
+ {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ return false;
}
public int Order