mirror of
https://github.com/Sonarr/Sonarr.git
synced 2026-04-20 21:54:58 -04:00
@@ -3,6 +3,7 @@ using NzbDrone.Core.Parser;
|
||||
using Sonarr.Api.V3.Episodes;
|
||||
using Sonarr.Api.V3.Series;
|
||||
using Sonarr.Http;
|
||||
using Sonarr.Http.REST;
|
||||
|
||||
namespace Sonarr.Api.V3.Parse
|
||||
{
|
||||
@@ -21,6 +22,12 @@ namespace Sonarr.Api.V3.Parse
|
||||
{
|
||||
var title = Request.Query.Title.Value as string;
|
||||
var path = Request.Query.Path.Value as string;
|
||||
|
||||
if (path.IsNullOrWhiteSpace() && title.IsNullOrWhiteSpace())
|
||||
{
|
||||
throw new BadRequestException("title or path is missing");
|
||||
}
|
||||
|
||||
var parsedEpisodeInfo = path.IsNotNullOrWhiteSpace() ? Parser.ParsePath(path) : Parser.ParseTitle(title);
|
||||
|
||||
if (parsedEpisodeInfo == null)
|
||||
|
||||
Reference in New Issue
Block a user