mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-03 22:38:30 +01:00
fixed xml providers running over and over
This commit is contained in:
@@ -30,10 +30,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
var path = Configuration.UseCustomLibrary ? GetRootFolderPath(Name) : ConfigurationManager.ApplicationPaths.DefaultUserViewsPath;
|
||||
|
||||
if (!Directory.Exists(path))
|
||||
{
|
||||
Directory.CreateDirectory(path);
|
||||
}
|
||||
Directory.CreateDirectory(path);
|
||||
|
||||
return path;
|
||||
}
|
||||
@@ -256,10 +253,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
_configurationDirectoryPath = GetConfigurationDirectoryPath(Name);
|
||||
|
||||
if (!Directory.Exists(_configurationDirectoryPath))
|
||||
{
|
||||
Directory.CreateDirectory(_configurationDirectoryPath);
|
||||
}
|
||||
Directory.CreateDirectory(_configurationDirectoryPath);
|
||||
}
|
||||
|
||||
return _configurationDirectoryPath;
|
||||
|
||||
@@ -205,10 +205,7 @@ namespace MediaBrowser.Controller.IO
|
||||
}
|
||||
|
||||
// Check if the target directory exists, if not, create it.
|
||||
if (!Directory.Exists(target))
|
||||
{
|
||||
Directory.CreateDirectory(target);
|
||||
}
|
||||
Directory.CreateDirectory(target);
|
||||
|
||||
foreach (var file in Directory.EnumerateFiles(source))
|
||||
{
|
||||
|
||||
@@ -159,10 +159,7 @@ namespace MediaBrowser.Controller.MediaInfo
|
||||
{
|
||||
var parentPath = Path.GetDirectoryName(path);
|
||||
|
||||
if (!Directory.Exists(parentPath))
|
||||
{
|
||||
Directory.CreateDirectory(parentPath);
|
||||
}
|
||||
Directory.CreateDirectory(parentPath);
|
||||
|
||||
await _encoder.ExtractImage(inputPath, type, video.Video3DFormat, time, path, cancellationToken).ConfigureAwait(false);
|
||||
chapter.ImagePath = path;
|
||||
|
||||
@@ -233,16 +233,6 @@ namespace MediaBrowser.Controller.Providers
|
||||
throw new ArgumentNullException("providerInfo");
|
||||
}
|
||||
|
||||
if (CompareDate(item) > providerInfo.LastRefreshed)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (RefreshOnFileSystemStampChange && item.LocationType == LocationType.FileSystem && HasFileSystemStampChanged(item, providerInfo))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (RefreshOnVersionChange && !String.Equals(ProviderVersion, providerInfo.ProviderVersion))
|
||||
{
|
||||
return true;
|
||||
@@ -258,9 +248,30 @@ namespace MediaBrowser.Controller.Providers
|
||||
return true;
|
||||
}
|
||||
|
||||
if (NeedsRefreshBasedOnCompareDate(item, providerInfo))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (RefreshOnFileSystemStampChange && item.LocationType == LocationType.FileSystem && HasFileSystemStampChanged(item, providerInfo))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Needses the refresh based on compare date.
|
||||
/// </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 NeedsRefreshBasedOnCompareDate(BaseItem item, BaseProviderInfo providerInfo)
|
||||
{
|
||||
return CompareDate(item) > providerInfo.LastRefreshed;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Determines if the item's file system stamp has changed from the last time the provider refreshed
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user