Browse Source

optimize plex tv scanner (#190)

pull/192/head
Jason Dove 5 years ago committed by GitHub
parent
commit
d7c080cafd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 12
      ErsatzTV.Core/Plex/PlexTelevisionLibraryScanner.cs

12
ErsatzTV.Core/Plex/PlexTelevisionLibraryScanner.cs

@ -70,7 +70,17 @@ namespace ErsatzTV.Core.Plex @@ -70,7 +70,17 @@ namespace ErsatzTV.Core.Plex
await maybeShow.Match(
async result =>
{
await ScanSeasons(library, result.Item, connection, token);
if (result.IsAdded || incoming.ShowMetadata.Head().DateUpdated >
result.Item.ShowMetadata.Head().DateUpdated)
{
await ScanSeasons(library, result.Item, connection, token);
}
else
{
_logger.LogDebug(
"Skipping Plex show that has not been updated: {Show}",
incoming.ShowMetadata.Head().Title);
}
if (result.IsAdded)
{

Loading…
Cancel
Save