mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-11-24 15:24:59 -05:00
Backport pull request #15514 from jellyfin/release-10.11.z
Add 1 minute tolerance for NFO change detection Original-merge: 6566188e453b42604dbb3ce532937951e88565d0 Merged-by: crobibero <cody@robibe.ro> Backported-by: Bond_009 <bond.009@outlook.com>
This commit is contained in:
parent
7e25089c08
commit
faf1cea63e
@ -68,12 +68,15 @@ namespace MediaBrowser.XbmcMetadata.Providers
|
||||
{
|
||||
var file = GetXmlFile(new ItemInfo(item), directoryService);
|
||||
|
||||
if (file is null)
|
||||
if (file?.Exists is not true)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return file.Exists && _fileSystem.GetLastWriteTimeUtc(file) > item.DateLastSaved;
|
||||
var fileTime = _fileSystem.GetLastWriteTimeUtc(file);
|
||||
|
||||
// 1 minute tolerance to avoid detecting our own file writes
|
||||
return (fileTime - item.DateLastSaved) > TimeSpan.FromMinutes(1);
|
||||
}
|
||||
|
||||
protected abstract void Fetch(MetadataResult<T> result, string path, CancellationToken cancellationToken);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user