Browse Source

fix cinema mode failure

Luke Pulverenti 9 năm trước cách đây
mục cha
commit
175d8dae5e
1 tập tin đã thay đổi với 11 bổ sung0 xóa
  1. 11 0
      MediaBrowser.Controller/Entities/BaseItem.cs

+ 11 - 0
MediaBrowser.Controller/Entities/BaseItem.cs

@@ -1163,6 +1163,17 @@ namespace MediaBrowser.Controller.Entities
         /// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
         protected virtual bool GetBlockUnratedValue(UserPolicy config)
         {
+            // Don't block plain folders that are unrated. Let the media underneath get blocked
+            // Special folders like series and albums will override this method.
+            if (IsFolder)
+            {
+                return false;
+            }
+            if (this is IItemByName)
+            {
+                return false;
+            }
+
             return config.BlockUnratedItems.Contains(UnratedItem.Other);
         }