1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-20 21:54:58 -04:00

Fixed: Parsing anime dual language titles

closes #3756
This commit is contained in:
Taloth Saldono
2020-05-17 23:01:41 +02:00
parent 5251db7224
commit a75e10c4c9
6 changed files with 94 additions and 2 deletions
+7
View File
@@ -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)