diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-09-08 13:10:17 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-09-08 13:10:17 -0400 |
| commit | aa03e8e14a550f3a5a49270803e7bec10bdd8cd1 (patch) | |
| tree | 5b6fdfaa457f7efc711c6656b08fac2b4cbe52ce | |
| parent | a254df9760a15b7713b5858d807626bf4195471e (diff) | |
validate artist images in post scan task
| -rw-r--r-- | MediaBrowser.Providers/ImageFromMediaLocationProvider.cs | 10 | ||||
| -rw-r--r-- | MediaBrowser.Providers/Music/ArtistsPostScanTask.cs | 3 |
2 files changed, 7 insertions, 6 deletions
diff --git a/MediaBrowser.Providers/ImageFromMediaLocationProvider.cs b/MediaBrowser.Providers/ImageFromMediaLocationProvider.cs index 176ddce9b..fe7fd8409 100644 --- a/MediaBrowser.Providers/ImageFromMediaLocationProvider.cs +++ b/MediaBrowser.Providers/ImageFromMediaLocationProvider.cs @@ -98,12 +98,12 @@ namespace MediaBrowser.Providers var args = GetResolveArgsContainingImages(item); // Make sure current image paths still exist - ValidateImages(item, args); + ValidateImages(item); cancellationToken.ThrowIfCancellationRequested(); // Make sure current backdrop paths still exist - ValidateBackdrops(item, args); + ValidateBackdrops(item); ValidateScreenshots(item, args); cancellationToken.ThrowIfCancellationRequested(); @@ -132,8 +132,7 @@ namespace MediaBrowser.Providers /// Validates that images within the item are still on the file system /// </summary> /// <param name="item">The item.</param> - /// <param name="args">The args.</param> - private void ValidateImages(BaseItem item, ItemResolveArgs args) + internal static void ValidateImages(BaseItem item) { // Only validate paths from the same directory - need to copy to a list because we are going to potentially modify the collection below var deletedKeys = item.Images @@ -153,8 +152,7 @@ namespace MediaBrowser.Providers /// Validates that backdrops within the item are still on the file system /// </summary> /// <param name="item">The item.</param> - /// <param name="args">The args.</param> - private void ValidateBackdrops(BaseItem item, ItemResolveArgs args) + internal static void ValidateBackdrops(BaseItem item) { // Only validate paths from the same directory - need to copy to a list because we are going to potentially modify the collection below var deletedImages = item.BackdropImagePaths diff --git a/MediaBrowser.Providers/Music/ArtistsPostScanTask.cs b/MediaBrowser.Providers/Music/ArtistsPostScanTask.cs index f67d61681..dd04f364b 100644 --- a/MediaBrowser.Providers/Music/ArtistsPostScanTask.cs +++ b/MediaBrowser.Providers/Music/ArtistsPostScanTask.cs @@ -63,6 +63,9 @@ namespace MediaBrowser.Providers.Music backdrops.InsertRange(0, artist.BackdropImagePaths); artist.BackdropImagePaths = backdrops.Distinct(StringComparer.OrdinalIgnoreCase) .ToList(); + + ImageFromMediaLocationProvider.ValidateImages(artist); + ImageFromMediaLocationProvider.ValidateBackdrops(artist); } if (!artist.LockedFields.Contains(MetadataFields.Genres)) |
