mirror of
https://github.com/Radarr/Radarr
synced 2025-02-22 22:31:26 +00:00
Fixed: Reject multi-part files with P1, P2, etc.
This commit is contained in:
parent
d888a0a2b3
commit
66aae0c91c
2 changed files with 13 additions and 2 deletions
|
@ -54,6 +54,17 @@ public void should_be_accepted_for_legitimate_files(object[] paths)
|
|||
@"C:\Test\Downloaded\Bad Boys (2006) part1.mkv",
|
||||
@"C:\Test\Downloaded\Bad Boys (2006) part2.mkv"
|
||||
})]
|
||||
|
||||
[TestCase(new object[]
|
||||
{
|
||||
@"C:\Test\Downloaded\Bad Boys (2006) pt1.mkv",
|
||||
@"C:\Test\Downloaded\Bad Boys (2006) pt2.mkv"
|
||||
})]
|
||||
[TestCase(new object[]
|
||||
{
|
||||
@"C:\Test\Downloaded\Bad Boys (2006) P1.mkv",
|
||||
@"C:\Test\Downloaded\Bad Boys (2006) P2.mkv"
|
||||
})]
|
||||
[TestCase(new object[]
|
||||
{
|
||||
@"C:\Test\Downloaded\blah blah - cd 1.mvk",
|
||||
|
|
|
@ -12,8 +12,8 @@ public class NotMultiPartSpecification : IImportDecisionEngineSpecification
|
|||
{
|
||||
private static readonly Regex[] MovieMultiPartRegex = new[]
|
||||
{
|
||||
new Regex(@"(?<!^)(?<identifier>[ _.-]*(?:cd|dvd|p(?:ar)?t|dis[ck])[ _.-]*[0-9]+)", RegexOptions.Compiled | RegexOptions.IgnoreCase),
|
||||
new Regex(@"(?<!^)(?<identifier>[ _.-]*(?:cd|dvd|p(?:ar)?t|dis[ck])[ _.-]*[a-d]+)", RegexOptions.Compiled | RegexOptions.IgnoreCase),
|
||||
new Regex(@"(?<!^)(?<identifier>[ _.-]*(?:cd|dvd|p(?:(?:ar)?t)?|dis[ck])[ _.-]*[0-9]+)", RegexOptions.Compiled | RegexOptions.IgnoreCase),
|
||||
new Regex(@"(?<!^)(?<identifier>[ _.-]*(?:cd|dvd|p(?:(?:ar)?t)?|dis[ck])[ _.-]*[a-d]+)", RegexOptions.Compiled | RegexOptions.IgnoreCase),
|
||||
};
|
||||
|
||||
private readonly IDiskProvider _diskProvider;
|
||||
|
|
Loading…
Reference in a new issue