mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
Add support for non numeric episodes
This commit is contained in:
@@ -498,7 +498,7 @@ namespace Jackett.Controllers
|
||||
queryStr = queryStr.Remove(seasonMatch.Index, seasonMatch.Length);
|
||||
}
|
||||
|
||||
var episodeMatch = Regex.Match(queryStr, @"E(\d{2,4})");
|
||||
var episodeMatch = Regex.Match(queryStr, @"E(\d{2,4}[A-Za-z]?)");
|
||||
if (episodeMatch.Success)
|
||||
{
|
||||
stringQuery.Episode = episodeMatch.Groups[1].Value;
|
||||
|
@@ -202,8 +202,16 @@ namespace Jackett.Models
|
||||
else if (string.IsNullOrEmpty(Episode))
|
||||
episodeString = string.Format("S{0:00}", Season);
|
||||
else
|
||||
episodeString = string.Format("S{0:00}E{1:00}", Season, ParseUtil.CoerceInt(Episode));
|
||||
|
||||
{
|
||||
try
|
||||
{
|
||||
episodeString = string.Format("S{0:00}E{1:00}", Season, ParseUtil.CoerceInt(Episode));
|
||||
} catch (FormatException) // e.g. seaching for S01E01A
|
||||
{
|
||||
episodeString = string.Format("S{0:00}E{1}", Season, Episode);
|
||||
}
|
||||
|
||||
}
|
||||
return episodeString;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user