Browse Source

fixed an issue getting collection type

Luke Pulverenti 12 years ago
parent
commit
e9722763b4
1 changed files with 3 additions and 2 deletions
  1. 3 2
      MediaBrowser.Server.Implementations/Library/LibraryManager.cs

+ 3 - 2
MediaBrowser.Server.Implementations/Library/LibraryManager.cs

@@ -1456,9 +1456,10 @@ namespace MediaBrowser.Server.Implementations.Library
                 })
                 })
                 .Select(i => i.CollectionType)
                 .Select(i => i.CollectionType)
                 .Where(i => !string.IsNullOrEmpty(i))
                 .Where(i => !string.IsNullOrEmpty(i))
-                .Distinct();
+                .Distinct()
+                .ToList();
 
 
-            return collectionTypes.SingleOrDefault();
+            return collectionTypes.Count == 1 ? collectionTypes[0] : null;
         }
         }
     }
     }
 }
 }