mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
Merge branch 'master' of https://github.com/Jackett/Jackett
This commit is contained in:
@@ -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()));
|
||||
|
Reference in New Issue
Block a user