aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Library/TVUtils.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Controller/Library/TVUtils.cs')
-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>