Skip to content

Commit

Permalink
Check if infopath exists for local Series, if not, return false.
Browse files Browse the repository at this point in the history
  • Loading branch information
ankenyr committed Jan 14, 2022
1 parent 3c6a0f1 commit 5918388
Showing 1 changed file with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,15 @@ FileSystemMetadata GetInfoJson(string path)
}
public bool HasChanged(BaseItem item, IDirectoryService directoryService)
{
_logger.LogDebug("HasChanged: {Name}", item.Name);
string infoPath = GetSeriesInfo(item.Path);
var infoJson = GetInfoJson(infoPath);
var result = infoJson.Exists && _fileSystem.GetLastWriteTimeUtc(infoJson) < item.DateLastSaved;
return result;
var infoPath = GetSeriesInfo(item.Path);
if (!String.IsNullOrEmpty(infoPath))
{
var infoJson = GetInfoJson(infoPath);
var result = infoJson.Exists && _fileSystem.GetLastWriteTimeUtc(infoJson) < item.DateLastSaved;
return result;
}
return false;

}
}
}

0 comments on commit 5918388

Please sign in to comment.