mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-27 04:21:27 +02:00
Added: Options to make parsing more lenient. (Adds support for some german and french releasegroups) (#1692)
Fixes #1676. Fixes #1632.
This commit is contained in:
@@ -4,6 +4,7 @@ using System.IO;
|
||||
using System.Linq;
|
||||
using NLog;
|
||||
using NzbDrone.Common.Extensions;
|
||||
using NzbDrone.Core.Configuration;
|
||||
using NzbDrone.Core.DataAugmentation.Scene;
|
||||
using NzbDrone.Core.IndexerSearch.Definitions;
|
||||
using NzbDrone.Core.MediaFiles;
|
||||
@@ -34,6 +35,7 @@ namespace NzbDrone.Core.Parser
|
||||
private readonly ISeriesService _seriesService;
|
||||
private readonly ISceneMappingService _sceneMappingService;
|
||||
private readonly IMovieService _movieService;
|
||||
private readonly IConfigService _config;
|
||||
private readonly Logger _logger;
|
||||
private static HashSet<ArabicRomanNumeral> _arabicRomanNumeralMappings;
|
||||
|
||||
@@ -42,12 +44,14 @@ namespace NzbDrone.Core.Parser
|
||||
ISeriesService seriesService,
|
||||
ISceneMappingService sceneMappingService,
|
||||
IMovieService movieService,
|
||||
IConfigService configService,
|
||||
Logger logger)
|
||||
{
|
||||
_episodeService = episodeService;
|
||||
_seriesService = seriesService;
|
||||
_sceneMappingService = sceneMappingService;
|
||||
_movieService = movieService;
|
||||
_config = configService;
|
||||
_logger = logger;
|
||||
|
||||
if (_arabicRomanNumeralMappings == null)
|
||||
@@ -127,7 +131,7 @@ namespace NzbDrone.Core.Parser
|
||||
|
||||
else
|
||||
{
|
||||
parsedMovieInfo = Parser.ParseMoviePath(filename);
|
||||
parsedMovieInfo = Parser.ParseMoviePath(filename, _config.ParsingLeniency > 0);
|
||||
}
|
||||
|
||||
if (parsedMovieInfo == null)
|
||||
@@ -172,7 +176,7 @@ namespace NzbDrone.Core.Parser
|
||||
|
||||
public Movie GetMovie(string title)
|
||||
{
|
||||
var parsedMovieInfo = Parser.ParseMovieTitle(title);
|
||||
var parsedMovieInfo = Parser.ParseMovieTitle(title, _config.ParsingLeniency > 0);
|
||||
|
||||
if (parsedMovieInfo == null)
|
||||
{
|
||||
|
Reference in New Issue
Block a user