aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2014-01-19 01:36:21 -0500
committerLuke Pulverenti <luke.pulverenti@gmail.com>2014-01-19 01:36:21 -0500
commita9f2a72d0b87115185a82aa2245aef1ea2e2b59f (patch)
tree173238df9e4f3f9a943b2d91e8ba521c9d96cd20 /MediaBrowser.Controller
parentd2cae4012853bb6457554516f06e5bbf11121b8d (diff)
#680 - Support new episode file sorting
Diffstat (limited to 'MediaBrowser.Controller')
-rw-r--r--MediaBrowser.Controller/Library/TVUtils.cs24
1 files changed, 24 insertions, 0 deletions
diff --git a/MediaBrowser.Controller/Library/TVUtils.cs b/MediaBrowser.Controller/Library/TVUtils.cs
index 67d78fa89..54ebf8914 100644
--- a/MediaBrowser.Controller/Library/TVUtils.cs
+++ b/MediaBrowser.Controller/Library/TVUtils.cs
@@ -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>