check item path for null/empty

This commit is contained in:
Luke Pulverenti 2016-08-10 23:56:14 -04:00
parent 6f20a8ca05
commit de0f97159b
1 changed files with 6 additions and 3 deletions

View File

@ -171,10 +171,13 @@ namespace MediaBrowser.Providers.MediaInfo
public bool HasChanged(IHasMetadata item, IDirectoryService directoryService)
{
var file = directoryService.GetFile(item.Path);
if (file != null && file.LastWriteTimeUtc != item.DateModified)
if (!string.IsNullOrWhiteSpace(item.Path))
{
return true;
var file = directoryService.GetFile(item.Path);
if (file != null && file.LastWriteTimeUtc != item.DateModified)
{
return true;
}
}
if (item.SupportsLocalMetadata)