diff options
| author | Luis Miguel Almánzar <ruisu15@gmail.com> | 2013-06-27 22:12:21 -0400 |
|---|---|---|
| committer | Luis Miguel Almánzar <ruisu15@gmail.com> | 2013-06-27 22:12:21 -0400 |
| commit | 8879240fc1128f6da99a985b68aef46a940a7ab7 (patch) | |
| tree | 5ce8c5490a791f00ea40c6cb4e3df30fb86601fa /MediaBrowser.Controller/Library/TVUtils.cs | |
| parent | ab6a060163f17bda49e6f9dae0d62e36c756a71b (diff) | |
Fixes #285 - Support tv with four digit seasons
Diffstat (limited to 'MediaBrowser.Controller/Library/TVUtils.cs')
| -rw-r--r-- | MediaBrowser.Controller/Library/TVUtils.cs | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/MediaBrowser.Controller/Library/TVUtils.cs b/MediaBrowser.Controller/Library/TVUtils.cs index 03df934cf..d8a715b0f 100644 --- a/MediaBrowser.Controller/Library/TVUtils.cs +++ b/MediaBrowser.Controller/Library/TVUtils.cs @@ -43,49 +43,49 @@ namespace MediaBrowser.Controller.Library private static readonly Regex[] EpisodeExpressions = new[] { new Regex( - @".*\\[s|S]?(?<seasonnumber>\d{1,2})[x|X](?<epnumber>\d{1,3})[^\\]*$", + @".*\\[s|S]?(?<seasonnumber>\d{1,4})[x|X](?<epnumber>\d{1,3})[^\\]*$", RegexOptions.Compiled), new Regex( - @".*\\[s|S](?<seasonnumber>\d{1,2})[x,X]?[e|E](?<epnumber>\d{1,3})[^\\]*$", + @".*\\[s|S](?<seasonnumber>\d{1,4})[x,X]?[e|E](?<epnumber>\d{1,3})[^\\]*$", RegexOptions.Compiled), new Regex( - @".*\\(?<seriesname>((?![s|S]?\d{1,2}[x|X]\d{1,3})[^\\])*)?([s|S]?(?<seasonnumber>\d{1,2})[x|X](?<epnumber>\d{1,3}))[^\\]*$", + @".*\\(?<seriesname>((?![s|S]?\d{1,4}[x|X]\d{1,3})[^\\])*)?([s|S]?(?<seasonnumber>\d{1,4})[x|X](?<epnumber>\d{1,3}))[^\\]*$", RegexOptions.Compiled), new Regex( - @".*\\(?<seriesname>[^\\]*)[s|S](?<seasonnumber>\d{1,2})[x|X|\.]?[e|E](?<epnumber>\d{1,3})[^\\]*$", + @".*\\(?<seriesname>[^\\]*)[s|S](?<seasonnumber>\d{1,4})[x|X|\.]?[e|E](?<epnumber>\d{1,3})[^\\]*$", RegexOptions.Compiled) }; private static readonly Regex[] MultipleEpisodeExpressions = new[] { new Regex( - @".*\\[s|S]?(?<seasonnumber>\d{1,2})[x|X](?<epnumber>\d{1,3})([ |-]{1,3}\d{1,2}[e|E|x|X](?<endingepnumber>\d{1,3}))+[^\\]*$", + @".*\\[s|S]?(?<seasonnumber>\d{1,4})[x|X](?<epnumber>\d{1,3})([ |-]{1,3}\d{1,4}[e|E|x|X](?<endingepnumber>\d{1,3}))+[^\\]*$", RegexOptions.Compiled), - new Regex( - @".*\\[s|S]?(?<seasonnumber>\d{1,2})[x|X](?<epnumber>\d{1,3})([ |-]{1,3}\d{1,2}[x|X][e|E](?<endingepnumber>\d{1,3}))+[^\\]*$", + new Regex( + @".*\\[s|S]?(?<seasonnumber>\d{1,4})[x|X](?<epnumber>\d{1,3})([ |-]{1,3}\d{1,4}[x|X][e|E](?<endingepnumber>\d{1,3}))+[^\\]*$", RegexOptions.Compiled), - new Regex( - @".*\\[s|S]?(?<seasonnumber>\d{1,2})[x|X](?<epnumber>\d{1,3})([ |-]{0,3}[x|X|e|E](?<endingepnumber>\d{1,3}))+[^\\]*$", + new Regex( + @".*\\[s|S]?(?<seasonnumber>\d{1,4})[x|X](?<epnumber>\d{1,3})([ |-]{0,3}[x|X|e|E](?<endingepnumber>\d{1,3}))+[^\\]*$", RegexOptions.Compiled), - new Regex( - @".*\\[s|S]?(?<seasonnumber>\d{1,2})[x|X](?<epnumber>\d{1,3})([ |-]{1,3}[x|E]?[e|E]?(?<endingepnumber>\d{1,3}))+[^\\]*$", + new Regex( + @".*\\[s|S]?(?<seasonnumber>\d{1,4})[x|X](?<epnumber>\d{1,3})([ |-]{1,3}[x|E]?[e|E]?(?<endingepnumber>\d{1,3}))+[^\\]*$", RegexOptions.Compiled), new Regex( - @".*\\(?<seriesname>((?![s|S]?\d{1,2}[x|X]\d{1,3})[^\\])*)?([s|S]?(?<seasonnumber>\d{1,2})[x|X](?<epnumber>\d{1,3}))([ |-]{1,3}\d{1,2}[x|X|e|E](?<endingepnumber>\d{1,3}))+[^\\]*$", + @".*\\(?<seriesname>((?![s|S]?\d{1,4}[x|X]\d{1,3})[^\\])*)?([s|S]?(?<seasonnumber>\d{1,4})[x|X](?<epnumber>\d{1,3}))([ |-]{1,3}\d{1,4}[x|X|e|E](?<endingepnumber>\d{1,3}))+[^\\]*$", RegexOptions.Compiled), - new Regex( - @".*\\(?<seriesname>((?![s|S]?\d{1,2}[x|X]\d{1,3})[^\\])*)?([s|S]?(?<seasonnumber>\d{1,2})[x|X](?<epnumber>\d{1,3}))([ |-]{1,3}\d{1,2}[x|X][e|E](?<endingepnumber>\d{1,3}))+[^\\]*$", + new Regex( + @".*\\(?<seriesname>((?![s|S]?\d{1,4}[x|X]\d{1,3})[^\\])*)?([s|S]?(?<seasonnumber>\d{1,4})[x|X](?<epnumber>\d{1,3}))([ |-]{1,3}\d{1,4}[x|X][e|E](?<endingepnumber>\d{1,3}))+[^\\]*$", RegexOptions.Compiled), - new Regex( - @".*\\(?<seriesname>((?![s|S]?\d{1,2}[x|X]\d{1,3})[^\\])*)?([s|S]?(?<seasonnumber>\d{1,2})[x|X](?<epnumber>\d{1,3}))([ |-]{0,3}[x|X|e|E](?<endingepnumber>\d{1,3}))+[^\\]*$", + new Regex( + @".*\\(?<seriesname>((?![s|S]?\d{1,4}[x|X]\d{1,3})[^\\])*)?([s|S]?(?<seasonnumber>\d{1,4})[x|X](?<epnumber>\d{1,3}))([ |-]{0,3}[x|X|e|E](?<endingepnumber>\d{1,3}))+[^\\]*$", RegexOptions.Compiled), - new Regex( - @".*\\(?<seriesname>((?![s|S]?\d{1,2}[x|X]\d{1,3})[^\\])*)?([s|S]?(?<seasonnumber>\d{1,2})[x|X](?<epnumber>\d{1,3}))([ |-]{1,3}[x|X]?[e|E]?(?<endingepnumber>\d{1,3}))+[^\\]*$", + new Regex( + @".*\\(?<seriesname>((?![s|S]?\d{1,4}[x|X]\d{1,3})[^\\])*)?([s|S]?(?<seasonnumber>\d{1,4})[x|X](?<epnumber>\d{1,3}))([ |-]{1,3}[x|X]?[e|E]?(?<endingepnumber>\d{1,3}))+[^\\]*$", RegexOptions.Compiled), new Regex( - @".*\\(?<seriesname>[^\\]*)[s|S](?<seasonnumber>\d{1,2})[x|X|\.]?[e|E](?<epnumber>\d{1,3})([ |-]{0,3}[x|X|e|E](?<endingepnumber>\d{1,3}))+[^\\]*$", + @".*\\(?<seriesname>[^\\]*)[s|S](?<seasonnumber>\d{1,4})[x|X|\.]?[e|E](?<epnumber>\d{1,3})([ |-]{0,3}[x|X|e|E](?<endingepnumber>\d{1,3}))+[^\\]*$", RegexOptions.Compiled), - new Regex( - @".*\\(?<seriesname>[^\\]*)[s|S](?<seasonnumber>\d{1,2})[x|X|\.]?[e|E](?<epnumber>\d{1,3})([ |-]{1,3}[x|X]?[e|E]?(?<endingepnumber>\d{1,3}))+[^\\]*$", + new Regex( + @".*\\(?<seriesname>[^\\]*)[s|S](?<seasonnumber>\d{1,4})[x|X|\.]?[e|E](?<epnumber>\d{1,3})([ |-]{1,3}[x|X]?[e|E]?(?<endingepnumber>\d{1,3}))+[^\\]*$", RegexOptions.Compiled) }; |
