add setting for photo libraries

This commit is contained in:
Luke Pulverenti 2016-08-15 00:36:17 -04:00
parent 51411fff82
commit caab8299d1
3 changed files with 9 additions and 2 deletions

View File

@ -3,5 +3,11 @@
public class LibraryOptions
{
public bool EnableArchiveMediaFiles { get; set; }
public bool EnablePhotos { get; set; }
public LibraryOptions()
{
EnablePhotos = true;
}
}
}

View File

@ -364,7 +364,7 @@ namespace MediaBrowser.Server.Implementations.Library
if (item.IsFolder)
{
if (!(item is ICollectionFolder) && !(item is UserView) && !(item is Channel))
if (!(item is ICollectionFolder) && !(item is UserView) && !(item is Channel) && !(item is AggregateFolder))
{
if (item.SourceType != SourceType.Library)
{

View File

@ -34,8 +34,9 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers
// Must be an image file within a photo collection
var collectionType = args.GetCollectionType();
if (string.Equals(collectionType, CollectionType.Photos, StringComparison.OrdinalIgnoreCase) ||
string.Equals(collectionType, CollectionType.HomeVideos, StringComparison.OrdinalIgnoreCase))
(string.Equals(collectionType, CollectionType.HomeVideos, StringComparison.OrdinalIgnoreCase) && args.GetLibraryOptions().EnablePhotos))
{
if (IsImageFile(args.Path, _imageProcessor))
{