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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user