mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-03 04:42:52 +01:00
consolidated duplicate code
This commit is contained in:
@@ -67,20 +67,6 @@ namespace MediaBrowser.Controller.Providers
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Needses the refresh internal.
|
||||
/// </summary>
|
||||
/// <param name="item">The item.</param>
|
||||
/// <param name="providerInfo">The provider info.</param>
|
||||
/// <returns><c>true</c> if XXXX, <c>false</c> otherwise</returns>
|
||||
protected override bool NeedsRefreshInternal(BaseItem item, BaseProviderInfo providerInfo)
|
||||
{
|
||||
if (item.DontFetchMeta) return false;
|
||||
|
||||
return DateTime.UtcNow > (providerInfo.LastRefreshed.AddDays(ConfigurationManager.Configuration.MetadataRefreshDays))
|
||||
&& ShouldFetch(item, providerInfo);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether [requires internet].
|
||||
/// </summary>
|
||||
@@ -99,16 +85,6 @@ namespace MediaBrowser.Controller.Providers
|
||||
get { return MetadataProviderPriority.Third; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Shoulds the fetch.
|
||||
/// </summary>
|
||||
/// <param name="item">The item.</param>
|
||||
/// <param name="providerInfo">The provider info.</param>
|
||||
/// <returns><c>true</c> if XXXX, <c>false</c> otherwise</returns>
|
||||
protected virtual bool ShouldFetch(BaseItem item, BaseProviderInfo providerInfo)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
#region Result Objects
|
||||
|
||||
protected class FanArtImageInfo
|
||||
|
||||
Reference in New Issue
Block a user