Simplify logic
This commit is contained in:
parent
2fa2952791
commit
e973757485
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue
Block a user