mirror of
https://github.com/mitb-archive/filebot
synced 2024-12-23 08:18:52 -05:00
Fix ReleaseInfo.clean issues
This commit is contained in:
parent
3779d48afa
commit
4d83f04812
@ -336,7 +336,7 @@ public class ReleaseInfo {
|
||||
String group = "((?<!\\p{Alnum})" + or(releaseGroup.get()) + "(?!\\p{Alnum})[\\p{Punct}]??)+";
|
||||
|
||||
// group pattern at beginning or ending of the string
|
||||
String[] groupHeadTail = { "(?<=^[^\\p{Alnum}]*)" + group, group + "(?=[\\p{Alpha}\\p{Punct}]*$)" };
|
||||
String[] groupHeadTail = { "(?<=^[\\P{Alnum}]*)" + group, group + "(?=[\\P{Alnum}]*$)" };
|
||||
|
||||
return compile(or(groupHeadTail), strict ? 0 : CASE_INSENSITIVE);
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
|
||||
package net.filebot.media;
|
||||
|
||||
import static java.util.Collections.*;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import java.util.regex.Pattern;
|
||||
@ -41,6 +42,9 @@ public class ReleaseInfoTest {
|
||||
|
||||
assertEquals("DVL", info.getReleaseGroup("Movie-DVL"));
|
||||
assertEquals("iMBT", info.getReleaseGroup("The.Legend.Of.Zorro-iMBT"));
|
||||
|
||||
assertEquals("[The Legend of the Blue Sea]", info.cleanRelease(singleton("The.Legend.of.the.Blue.Sea.E01"), false).toString());
|
||||
assertEquals("[The Legend of the Blue Sea]", info.cleanRelease(singleton("[Legend].The.Legend.of.the.Blue.Sea.E01-Legend"), false).toString());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
Loading…
Reference in New Issue
Block a user