diff options
| author | Luke <luke.pulverenti@gmail.com> | 2016-11-03 19:59:50 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-11-03 19:59:50 -0400 |
| commit | c53745548ac2130f4cfbbe0d7a2804c36c8ae4eb (patch) | |
| tree | 6ee298ebb5470c4f3bcbef8d814a0354901469c4 /MediaBrowser.Server.Implementations/Library/Resolvers/PhotoAlbumResolver.cs | |
| parent | 338b04a0c58729ec70aed89924ea6bd12422872b (diff) | |
| parent | 405a5f69c5967b4d919b5fe91396f12cb83e8aa8 (diff) | |
Merge pull request #2267 from MediaBrowser/dev
Dev
Diffstat (limited to 'MediaBrowser.Server.Implementations/Library/Resolvers/PhotoAlbumResolver.cs')
| -rw-r--r-- | MediaBrowser.Server.Implementations/Library/Resolvers/PhotoAlbumResolver.cs | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/MediaBrowser.Server.Implementations/Library/Resolvers/PhotoAlbumResolver.cs b/MediaBrowser.Server.Implementations/Library/Resolvers/PhotoAlbumResolver.cs deleted file mode 100644 index 957fafb92..000000000 --- a/MediaBrowser.Server.Implementations/Library/Resolvers/PhotoAlbumResolver.cs +++ /dev/null @@ -1,56 +0,0 @@ -using MediaBrowser.Controller.Drawing; -using MediaBrowser.Controller.Entities; -using MediaBrowser.Controller.Library; -using MediaBrowser.Controller.Resolvers; -using MediaBrowser.Model.Entities; -using System; -using System.IO; -using System.Linq; - -namespace MediaBrowser.Server.Implementations.Library.Resolvers -{ - public class PhotoAlbumResolver : FolderResolver<PhotoAlbum> - { - private readonly IImageProcessor _imageProcessor; - public PhotoAlbumResolver(IImageProcessor imageProcessor) - { - _imageProcessor = imageProcessor; - } - - /// <summary> - /// Resolves the specified args. - /// </summary> - /// <param name="args">The args.</param> - /// <returns>Trailer.</returns> - protected override PhotoAlbum Resolve(ItemResolveArgs args) - { - // Must be an image file within a photo collection - if (args.IsDirectory && string.Equals(args.GetCollectionType(), CollectionType.Photos, StringComparison.OrdinalIgnoreCase)) - { - if (HasPhotos(args)) - { - return new PhotoAlbum - { - Path = args.Path - }; - } - } - - return null; - } - - private bool HasPhotos(ItemResolveArgs args) - { - return args.FileSystemChildren.Any(i => (!i.IsDirectory) && PhotoResolver.IsImageFile(i.FullName, _imageProcessor)); - } - - public override ResolverPriority Priority - { - get - { - // Behind special folder resolver - return ResolverPriority.Second; - } - } - } -} |
