Simplify logic

This commit is contained in:
Bill Thornton 2020-07-22 11:32:29 -04:00
parent 2fa2952791
commit e973757485

View File

@ -1876,15 +1876,13 @@ namespace Emby.Server.Implementations.Library
}
var outdated = forceUpdate ? item.ImageInfos.Where(i => i.Path != null).ToArray() : item.ImageInfos.Where(ImageNeedsRefresh).ToArray();
if (outdated.Length == 0)
// Skip image processing if current or live tv source
if (outdated.Length == 0 || item.SourceType != SourceType.Library)
{
RegisterItem(item);
return;
}
// Skip image processing for live tv
if (item.SourceType == SourceType.Library)
{
foreach (var img in outdated)
{
var image = img;
@ -1940,7 +1938,6 @@ namespace Emby.Server.Implementations.Library
_logger.LogError(ex, "Cannot update DateModified for {0}", image.Path);
}
}
}
_itemRepository.SaveImages(item);
RegisterItem(item);