diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-05-23 11:40:35 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-05-23 11:40:35 -0400 |
| commit | b7096d2092f58f8c6135ce4623d34251438f1fa4 (patch) | |
| tree | 943686eda1a3c9d4e1a0817fde01a987d5dbe0a0 /MediaBrowser.Controller | |
| parent | a7f789229447c1bc848f8087969871ac20eba6cb (diff) | |
| parent | 8452e2f1250b37aa6584faed2bb9d36ddef0a1b2 (diff) | |
Merge branch 'master' of https://github.com/MediaBrowser/MediaBrowser
Diffstat (limited to 'MediaBrowser.Controller')
| -rw-r--r-- | MediaBrowser.Controller/Entities/BaseItem.cs | 5 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Entities/Folder.cs | 15 |
2 files changed, 20 insertions, 0 deletions
diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.cs index 10b3aa7228..ac8688f77e 100644 --- a/MediaBrowser.Controller/Entities/BaseItem.cs +++ b/MediaBrowser.Controller/Entities/BaseItem.cs @@ -1072,6 +1072,11 @@ namespace MediaBrowser.Controller.Entities return true; } + if (user.Configuration.BlockNotRated && string.IsNullOrEmpty(CustomRating ?? OfficialRating)) + { + return false; + } + return Ratings.Level(CustomRating ?? OfficialRating) <= user.Configuration.MaxParentalRating.Value; } diff --git a/MediaBrowser.Controller/Entities/Folder.cs b/MediaBrowser.Controller/Entities/Folder.cs index b327756559..2033130937 100644 --- a/MediaBrowser.Controller/Entities/Folder.cs +++ b/MediaBrowser.Controller/Entities/Folder.cs @@ -121,6 +121,21 @@ namespace MediaBrowser.Controller.Entities } /// <summary> + /// Never want folders to be blocked by "BlockNotRated" + /// </summary> + public override string OfficialRating + { + get + { + return !string.IsNullOrEmpty(base.OfficialRating) ? base.OfficialRating : "None"; + } + set + { + base.OfficialRating = value; + } + } + + /// <summary> /// Removes the child. /// </summary> /// <param name="item">The item.</param> |
