mirror of
https://github.com/mitb-archive/filebot
synced 2025-01-11 05:48:01 -05:00
* fine-tune media index
This commit is contained in:
parent
91e6fbc5a1
commit
fd3771b4b6
@ -70,14 +70,17 @@ def getNamePermutations(names) {
|
||||
def fn2 = { s -> s.replaceAll(/\s&\s/, ' and ') }
|
||||
def fn3 = { s -> s.replaceAll(/\([^\)]*\)$/, '') }
|
||||
|
||||
def out = new LinkedHashSet(names*.trim())
|
||||
def out = new LinkedHashSet(names*.trim()).toList()
|
||||
def res = out
|
||||
[fn1, fn2, fn3].each{ fn ->
|
||||
res = res.findResults{ fn(it) }
|
||||
}
|
||||
out += res
|
||||
|
||||
out = out.findAll{ it.length() >= 2 && !(it =~ /^[a-z]/) && it =~ /^[.\p{L}\p{Digit}]/ } // MUST START WITH UNICODE LETTER
|
||||
out = out.unique{ it.toLowerCase().normalizePunctuation() }.findAll{ it.length() > 0 }.toList()
|
||||
out = out.findAll{ !MediaDetection.releaseInfo.structureRootPattern.matcher(it).matches() } // IGNORE NAMES THAT OVERLAP WITH MEDIA FOLDER NAMES
|
||||
|
||||
out = out.unique{ it.toLowerCase().normalizePunctuation() }.findAll{ it.length() > 0 }
|
||||
out = out.size() <= 4 ? out : out.subList(0, 4)
|
||||
return out
|
||||
}
|
||||
|
@ -209,7 +209,7 @@ public class ReleaseInfo {
|
||||
if (structureRootFolderPattern == null) {
|
||||
List<String> folders = new ArrayList<String>();
|
||||
for (String it : queryBlacklistResource.get()) {
|
||||
if (it.startsWith("^")) {
|
||||
if (it.startsWith("^") && it.endsWith("$")) {
|
||||
folders.add(it);
|
||||
}
|
||||
}
|
||||
|
@ -15,10 +15,9 @@
|
||||
\d{2,4}.\b\d{2}.\b\d{2}.\b\d{2}.\b\d{2}
|
||||
\d{3,4}[pi]
|
||||
^(amc|cover|dvd)
|
||||
^(TV.)?(Show|Serie)[s]?
|
||||
^[0-9]{1,2}[.]
|
||||
^[A-Z0-9]{1,2}$
|
||||
^[lp]
|
||||
^\w{1,2}$
|
||||
^Action$
|
||||
^Adventure$
|
||||
^and$
|
||||
@ -118,6 +117,9 @@
|
||||
^transfer$
|
||||
^transmission$
|
||||
^TV$
|
||||
^TV.Series$
|
||||
^TV.Show$
|
||||
^TV.Shows$
|
||||
^unsorted$
|
||||
^user$
|
||||
^utorrent$
|
||||
|
Loading…
Reference in New Issue
Block a user