mirror of
https://github.com/Jackett/Jackett
synced 2025-02-21 22:07:10 +00:00
Merge branch 'master' of https://github.com/Jackett/Jackett
This commit is contained in:
commit
85ea6e5a2b
1 changed files with 9 additions and 1 deletions
|
@ -1,7 +1,8 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
using Jackett.Common.Models;
|
||||
using Jackett.Common.Models.IndexerConfig;
|
||||
|
@ -91,6 +92,13 @@ namespace Jackett.Common.Indexers
|
|||
var btnOffset = query.Offset;
|
||||
var releases = new List<ReleaseInfo>();
|
||||
|
||||
// If only the season is searched for then change format to match expected format
|
||||
var seasonOnlyMatch = new Regex(@".*\s[Ss]{1}\d{2}(?<![Ee]{1}\d{2,3})?$").Match(searchString);
|
||||
if (seasonOnlyMatch.Success)
|
||||
{
|
||||
searchString = Regex.Replace(searchString, @"[Ss]{1}\d{2}", $"Season {query.Season}");
|
||||
}
|
||||
|
||||
var parameters = new JArray();
|
||||
parameters.Add(new JValue(configData.Key.Value));
|
||||
parameters.Add(new JValue(searchString.Trim()));
|
||||
|
|
Loading…
Reference in a new issue