aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Entities/BaseItem.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2017-09-13 14:41:48 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2017-09-13 14:41:48 -0400
commit38fe239f4490eb4bf839e9b872f7d9c8172decf9 (patch)
tree8637dc9f758d709259d405109472b5c78d5b5472 /MediaBrowser.Controller/Entities/BaseItem.cs
parentca1ab81d3c9993542276f58b435a308c4590434c (diff)
3.2.30.19
Diffstat (limited to 'MediaBrowser.Controller/Entities/BaseItem.cs')
-rw-r--r--MediaBrowser.Controller/Entities/BaseItem.cs26
1 files changed, 22 insertions, 4 deletions
diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.cs
index c41d3e0cd..4416c5e91 100644
--- a/MediaBrowser.Controller/Entities/BaseItem.cs
+++ b/MediaBrowser.Controller/Entities/BaseItem.cs
@@ -918,9 +918,10 @@ namespace MediaBrowser.Controller.Entities
{
get
{
- if (!string.IsNullOrWhiteSpace(OfficialRating))
+ var officialRating = OfficialRating;
+ if (!string.IsNullOrWhiteSpace(officialRating))
{
- return OfficialRating;
+ return officialRating;
}
var parent = DisplayParent;
@@ -938,9 +939,10 @@ namespace MediaBrowser.Controller.Entities
{
get
{
- if (!string.IsNullOrWhiteSpace(CustomRating))
+ var customRating = CustomRating;
+ if (!string.IsNullOrWhiteSpace(customRating))
{
- return CustomRating;
+ return customRating;
}
var parent = DisplayParent;
@@ -2480,5 +2482,21 @@ namespace MediaBrowser.Controller.Entities
{
return null;
}
+
+ public virtual ItemUpdateType OnMetadataChanged()
+ {
+ var updateType = ItemUpdateType.None;
+
+ var item = this;
+
+ var inheritedParentalRatingValue = item.GetInheritedParentalRatingValue() ?? 0;
+ if (inheritedParentalRatingValue != item.InheritedParentalRatingValue)
+ {
+ item.InheritedParentalRatingValue = inheritedParentalRatingValue;
+ updateType |= ItemUpdateType.MetadataImport;
+ }
+
+ return updateType;
+ }
}
} \ No newline at end of file