Explorar el Código

add setting for photo libraries

Luke Pulverenti hace 8 años
padre
commit
caab8299d1

+ 6 - 0
MediaBrowser.Model/Configuration/LibraryOptions.cs

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

+ 1 - 1
MediaBrowser.Server.Implementations/Library/LibraryManager.cs

@@ -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)
                     {

+ 2 - 1
MediaBrowser.Server.Implementations/Library/Resolvers/PhotoResolver.cs

@@ -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))
                     {