broadcasthenet: season regex replace. resolves #13786 (#13787)

This commit is contained in:
ilike2burnthing
2022-12-18 06:00:24 +00:00
committed by GitHub
parent f935062818
commit 75b0cf089d

View File

@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using Jackett.Common.Models;
using Jackett.Common.Models.IndexerConfig;
@@ -96,6 +97,7 @@ namespace Jackett.Common.Indexers
protected override async Task<IEnumerable<ReleaseInfo>> PerformQuery(TorznabQuery query)
{
var searchString = query.GetQueryString();
searchString = Regex.Replace(searchString, @"(?i)\bS0*(\d+)\b", "Season $1");
var btnResults = query.Limit;
if (btnResults == 0)
btnResults = (int)TorznabCaps.LimitsDefault;