aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Entities/AdultVideo.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2014-02-13 00:11:54 -0500
committerLuke Pulverenti <luke.pulverenti@gmail.com>2014-02-13 00:11:54 -0500
commiteec9e0482525c400e9dc7cb17bc000434adba105 (patch)
tree73f51bc882804ff92b82d1e85a46a6cec10b6d51 /MediaBrowser.Controller/Entities/AdultVideo.cs
parent9254c37d52af3d16ec9e46b3e211ecc7dc4f1617 (diff)
take photos into the core
Diffstat (limited to 'MediaBrowser.Controller/Entities/AdultVideo.cs')
-rw-r--r--MediaBrowser.Controller/Entities/AdultVideo.cs22
1 files changed, 22 insertions, 0 deletions
diff --git a/MediaBrowser.Controller/Entities/AdultVideo.cs b/MediaBrowser.Controller/Entities/AdultVideo.cs
index fc7632152..9791f7cf7 100644
--- a/MediaBrowser.Controller/Entities/AdultVideo.cs
+++ b/MediaBrowser.Controller/Entities/AdultVideo.cs
@@ -1,4 +1,5 @@
using System.Collections.Generic;
+using MediaBrowser.Controller.Providers;
namespace MediaBrowser.Controller.Entities
{
@@ -22,5 +23,26 @@ namespace MediaBrowser.Controller.Entities
{
Taglines = new List<string>();
}
+
+ public override bool BeforeMetadataRefresh()
+ {
+ var hasChanges = base.BeforeMetadataRefresh();
+
+ if (!ProductionYear.HasValue)
+ {
+ int? yearInName = null;
+ string name;
+
+ NameParser.ParseName(Name, out name, out yearInName);
+
+ if (yearInName.HasValue)
+ {
+ ProductionYear = yearInName;
+ hasChanges = true;
+ }
+ }
+
+ return hasChanges;
+ }
}
}