2014-02-11 14:41:01 -07:00
|
|
|
|
using System.Collections.Generic;
|
2014-02-12 22:11:54 -07:00
|
|
|
|
using MediaBrowser.Controller.Providers;
|
2014-02-11 14:41:01 -07:00
|
|
|
|
|
2013-07-16 11:47:05 -07:00
|
|
|
|
namespace MediaBrowser.Controller.Entities
|
|
|
|
|
{
|
2014-05-16 12:16:29 -07:00
|
|
|
|
public class AdultVideo : Video, IHasProductionLocations, IHasPreferredMetadataLanguage, IHasTaglines
|
2013-07-16 11:47:05 -07:00
|
|
|
|
{
|
2014-02-05 21:39:16 -07:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets or sets the preferred metadata language.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <value>The preferred metadata language.</value>
|
2013-12-26 17:23:58 -07:00
|
|
|
|
public string PreferredMetadataLanguage { get; set; }
|
2013-12-28 09:58:13 -07:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets or sets the preferred metadata country code.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <value>The preferred metadata country code.</value>
|
|
|
|
|
public string PreferredMetadataCountryCode { get; set; }
|
2014-05-16 12:16:29 -07:00
|
|
|
|
public List<string> ProductionLocations { get; set; }
|
2014-02-11 14:41:01 -07:00
|
|
|
|
|
|
|
|
|
public List<string> Taglines { get; set; }
|
|
|
|
|
|
|
|
|
|
public AdultVideo()
|
|
|
|
|
{
|
|
|
|
|
Taglines = new List<string>();
|
2014-05-16 12:16:29 -07:00
|
|
|
|
ProductionLocations = new List<string>();
|
2014-02-11 14:41:01 -07:00
|
|
|
|
}
|
2014-02-12 22:11:54 -07:00
|
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
}
|
2013-07-16 11:47:05 -07:00
|
|
|
|
}
|
|
|
|
|
}
|