From 43d9cea6c4da874cd85335c2c325d7863933a362 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Tue, 9 Apr 2013 08:50:51 -0400 Subject: [PATCH] Media Thumbs (not chapters) (#127) --- .../MediaInfo/FFMpegAudioImageProvider.cs | 15 +++++++++++++++ .../MediaInfo/FFMpegVideoImageProvider.cs | 15 +++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/MediaBrowser.Controller/Providers/MediaInfo/FFMpegAudioImageProvider.cs b/MediaBrowser.Controller/Providers/MediaInfo/FFMpegAudioImageProvider.cs index 421b0522d..e1cbc6932 100644 --- a/MediaBrowser.Controller/Providers/MediaInfo/FFMpegAudioImageProvider.cs +++ b/MediaBrowser.Controller/Providers/MediaInfo/FFMpegAudioImageProvider.cs @@ -51,6 +51,21 @@ namespace MediaBrowser.Controller.Providers.MediaInfo return _locks.GetOrAdd(filename, key => new SemaphoreSlim(1, 1)); } + /// + /// Needses the refresh internal. + /// + /// The item. + /// The provider info. + /// true if XXXX, false otherwise + protected override bool NeedsRefreshInternal(BaseItem item, BaseProviderInfo providerInfo) + { + if (!string.IsNullOrEmpty(item.PrimaryImagePath)) + { + return false; + } + return base.NeedsRefreshInternal(item, providerInfo); + } + /// /// Fetches metadata and returns true or false indicating if any work that requires persistence was done /// diff --git a/MediaBrowser.Controller/Providers/MediaInfo/FFMpegVideoImageProvider.cs b/MediaBrowser.Controller/Providers/MediaInfo/FFMpegVideoImageProvider.cs index a29dbb043..ad81fa442 100644 --- a/MediaBrowser.Controller/Providers/MediaInfo/FFMpegVideoImageProvider.cs +++ b/MediaBrowser.Controller/Providers/MediaInfo/FFMpegVideoImageProvider.cs @@ -70,6 +70,21 @@ namespace MediaBrowser.Controller.Providers.MediaInfo return false; } + /// + /// Needses the refresh internal. + /// + /// The item. + /// The provider info. + /// true if XXXX, false otherwise + protected override bool NeedsRefreshInternal(BaseItem item, BaseProviderInfo providerInfo) + { + if (!string.IsNullOrEmpty(item.PrimaryImagePath)) + { + return false; + } + return base.NeedsRefreshInternal(item, providerInfo); + } + /// /// The true task result ///