add support to movie names with dot notation

This commit is contained in:
Luis Miguel Almánzar
2013-10-28 20:35:01 -04:00
parent e7a1f52373
commit d77122ba0f
3 changed files with 43 additions and 1 deletions

View File

@@ -189,6 +189,7 @@ namespace MediaBrowser.Providers.Movies
static readonly Regex[] NameMatches = new[] {
new Regex(@"(?<name>.*)\((?<year>\d{4})\)"), // matches "My Movie (2001)" and gives us the name and the year
new Regex(@"(?<name>.*)(\.(?<year>\d{4})(\.|$)).*$"),
new Regex(@"(?<name>.*)") // last resort matches the whole string as the name
};
@@ -320,7 +321,7 @@ namespace MediaBrowser.Providers.Movies
/// <param name="name">The name.</param>
/// <param name="justName">Name of the just.</param>
/// <param name="year">The year.</param>
protected void ParseName(string name, out string justName, out int? year)
public static void ParseName(string name, out string justName, out int? year)
{
justName = null;
year = null;