mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-25 03:24:47 +01:00
consolidated duplicate code
This commit is contained in:
@@ -203,6 +203,8 @@ namespace MediaBrowser.Controller.Providers
|
||||
throw new ArgumentNullException("providerInfo");
|
||||
}
|
||||
|
||||
if (item.DontFetchMeta && RequiresInternet) return false;
|
||||
|
||||
if (CompareDate(item) > providerInfo.LastRefreshed)
|
||||
{
|
||||
return true;
|
||||
@@ -218,6 +220,16 @@ namespace MediaBrowser.Controller.Providers
|
||||
return true;
|
||||
}
|
||||
|
||||
if (RequiresInternet && DateTime.UtcNow > (providerInfo.LastRefreshed.AddDays(ConfigurationManager.Configuration.MetadataRefreshDays)))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (providerInfo.LastRefreshStatus != ProviderRefreshStatus.Success)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user