1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-18 21:35:27 -04:00

Don't send full paths to Skyhook for searches

This commit is contained in:
Mark McDowall
2025-11-26 18:08:57 -08:00
parent f76ae1cce9
commit 8e537cb626
2 changed files with 18 additions and 0 deletions
@@ -0,0 +1,12 @@
using System.Net;
using NzbDrone.Core.Exceptions;
namespace NzbDrone.Core.MetadataSource.SkyHook;
public class InvalidSearchTermException : NzbDroneClientException
{
public InvalidSearchTermException(string message, params object[] args)
: base(HttpStatusCode.BadRequest, message, args)
{
}
}
@@ -5,6 +5,7 @@ using System.Linq;
using System.Net;
using NLog;
using NzbDrone.Common.Cloud;
using NzbDrone.Common.Disk;
using NzbDrone.Common.Extensions;
using NzbDrone.Common.Http;
using NzbDrone.Core.DataAugmentation.DailySeries;
@@ -106,6 +107,11 @@ namespace NzbDrone.Core.MetadataSource.SkyHook
public List<Series> SearchForNewSeries(string title)
{
if (title.IsPathValid(PathValidationType.AnyOs))
{
throw new InvalidSearchTermException("Invalid search term '{0}'", title);
}
try
{
var lowerTitle = title.ToLowerInvariant();