1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-11-24 08:42:19 +02:00

Parse path in ParseModule

Closes #358
This commit is contained in:
Mark McDowall 2017-08-21 21:24:15 -07:00
parent f3bf50e8d7
commit 810701ad52
No known key found for this signature in database
GPG Key ID: D4CEFA9A718052E0

View File

@ -1,5 +1,6 @@
using NzbDrone.Api.Episodes;
using NzbDrone.Api.Series;
using NzbDrone.Common.Extensions;
using NzbDrone.Core.Parser;
namespace NzbDrone.Api.Parse
@ -18,7 +19,8 @@ public ParseModule(IParsingService parsingService)
private ParseResource Parse()
{
var title = Request.Query.Title.Value as string;
var parsedEpisodeInfo = Parser.ParseTitle(title);
var path = Request.Query.Path.Value as string;
var parsedEpisodeInfo = path.IsNotNullOrWhiteSpace() ? Parser.ParsePath(path) : Parser.ParseTitle(title);
if (parsedEpisodeInfo == null)
{