using MediaBrowser.Controller.Entities;
using System;
using MediaBrowser.Model.Logging;
namespace MediaBrowser.Controller.Providers
{
///
/// Class FanartBaseProvider
///
public abstract class FanartBaseProvider : BaseMetadataProvider
{
///
/// The LOG o_ FILE
///
protected const string LOGO_FILE = "logo.png";
///
/// The AR t_ FILE
///
protected const string ART_FILE = "clearart.png";
///
/// The THUM b_ FILE
///
protected const string THUMB_FILE = "thumb.jpg";
///
/// The DIS c_ FILE
///
protected const string DISC_FILE = "disc.png";
///
/// The BANNE r_ FILE
///
protected const string BANNER_FILE = "banner.png";
///
/// The API key
///
protected const string APIKey = "5c6b04c68e904cfed1e6cbc9a9e683d4";
protected FanartBaseProvider(ILogManager logManager) : base(logManager)
{
}
///
/// Needses the refresh internal.
///
/// The item.
/// The provider info.
/// true if XXXX, false otherwise
protected override bool NeedsRefreshInternal(BaseItem item, BaseProviderInfo providerInfo)
{
if (item.DontFetchMeta) return false;
return DateTime.UtcNow > (providerInfo.LastRefreshed.AddDays(Kernel.Instance.Configuration.MetadataRefreshDays))
&& ShouldFetch(item, providerInfo);
}
///
/// Gets a value indicating whether [requires internet].
///
/// true if [requires internet]; otherwise, false.
public override bool RequiresInternet
{
get
{
return true;
}
}
///
/// Gets the priority.
///
/// The priority.
public override MetadataProviderPriority Priority
{
get { return MetadataProviderPriority.Third; }
}
///
/// Shoulds the fetch.
///
/// The item.
/// The provider info.
/// true if XXXX, false otherwise
protected virtual bool ShouldFetch(BaseItem item, BaseProviderInfo providerInfo)
{
return false;
}
}
}