mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-03 07:16:31 +01:00
add support to movie names with dot notation
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user