#680 - Support new episode file sorting

This commit is contained in:
Luke Pulverenti
2014-01-19 01:36:21 -05:00
parent d2cae40128
commit a9f2a72d0b
12 changed files with 383 additions and 2 deletions

View File

@@ -331,6 +331,30 @@ namespace MediaBrowser.Controller.Library
return null;
}
public static string GetSeriesNameFromEpisodeFile(string fullPath)
{
var fl = fullPath.ToLower();
foreach (var r in EpisodeExpressions)
{
var m = r.Match(fl);
if (m.Success)
{
var g = m.Groups["seriesname"];
if (g != null)
{
var val = g.Value;
if (!string.IsNullOrWhiteSpace(val))
{
return val;
}
}
return null;
}
}
return null;
}
/// <summary>
/// Gets the air days.
/// </summary>