take photos into the core

This commit is contained in:
Luke Pulverenti
2014-02-13 00:11:54 -05:00
parent 9254c37d52
commit eec9e04825
63 changed files with 1567 additions and 360 deletions

View File

@@ -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;
}
}
}