Browse Source

fix synchronizing plex show metadata (#163)

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

4
ErsatzTV.Core/Plex/PlexTelevisionLibraryScanner.cs

@ -124,8 +124,6 @@ namespace ErsatzTV.Core.Plex
// TODO: this probably doesn't work // TODO: this probably doesn't work
// plex doesn't seem to update genres returned by the main library call // plex doesn't seem to update genres returned by the main library call
if (incomingMetadata.DateUpdated > existingMetadata.DateUpdated)
{
foreach (Genre genre in existingMetadata.Genres foreach (Genre genre in existingMetadata.Genres
.Filter(g => incomingMetadata.Genres.All(g2 => g2.Name != g.Name)) .Filter(g => incomingMetadata.Genres.All(g2 => g2.Name != g.Name))
.ToList()) .ToList())
@ -170,6 +168,8 @@ namespace ErsatzTV.Core.Plex
} }
} }
if (result.IsUpdated)
{
await _metadataRepository.MarkAsUpdated(existingMetadata, incomingMetadata.DateUpdated); await _metadataRepository.MarkAsUpdated(existingMetadata, incomingMetadata.DateUpdated);
} }

Loading…
Cancel
Save