mirror of
https://github.com/mitb-archive/filebot
synced 2024-08-13 17:03:45 -04: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 fn2 = { s -> s.replaceAll(/\s&\s/, ' and ') }
|
||||||
def fn3 = { s -> s.replaceAll(/\([^\)]*\)$/, '') }
|
def fn3 = { s -> s.replaceAll(/\([^\)]*\)$/, '') }
|
||||||
|
|
||||||
def out = new LinkedHashSet(names*.trim())
|
def out = new LinkedHashSet(names*.trim()).toList()
|
||||||
def res = out
|
def res = out
|
||||||
[fn1, fn2, fn3].each{ fn ->
|
[fn1, fn2, fn3].each{ fn ->
|
||||||
res = res.findResults{ fn(it) }
|
res = res.findResults{ fn(it) }
|
||||||
}
|
}
|
||||||
out += res
|
out += res
|
||||||
|
|
||||||
out = out.findAll{ it.length() >= 2 && !(it =~ /^[a-z]/) && it =~ /^[.\p{L}\p{Digit}]/ } // MUST START WITH UNICODE LETTER
|
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)
|
out = out.size() <= 4 ? out : out.subList(0, 4)
|
||||||
return out
|
return out
|
||||||
}
|
}
|
||||||
|
@ -209,7 +209,7 @@ public class ReleaseInfo {
|
|||||||
if (structureRootFolderPattern == null) {
|
if (structureRootFolderPattern == null) {
|
||||||
List<String> folders = new ArrayList<String>();
|
List<String> folders = new ArrayList<String>();
|
||||||
for (String it : queryBlacklistResource.get()) {
|
for (String it : queryBlacklistResource.get()) {
|
||||||
if (it.startsWith("^")) {
|
if (it.startsWith("^") && it.endsWith("$")) {
|
||||||
folders.add(it);
|
folders.add(it);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,10 +15,9 @@
|
|||||||
\d{2,4}.\b\d{2}.\b\d{2}.\b\d{2}.\b\d{2}
|
\d{2,4}.\b\d{2}.\b\d{2}.\b\d{2}.\b\d{2}
|
||||||
\d{3,4}[pi]
|
\d{3,4}[pi]
|
||||||
^(amc|cover|dvd)
|
^(amc|cover|dvd)
|
||||||
^(TV.)?(Show|Serie)[s]?
|
|
||||||
^[0-9]{1,2}[.]
|
^[0-9]{1,2}[.]
|
||||||
^[A-Z0-9]{1,2}$
|
|
||||||
^[lp]
|
^[lp]
|
||||||
|
^\w{1,2}$
|
||||||
^Action$
|
^Action$
|
||||||
^Adventure$
|
^Adventure$
|
||||||
^and$
|
^and$
|
||||||
@ -118,6 +117,9 @@
|
|||||||
^transfer$
|
^transfer$
|
||||||
^transmission$
|
^transmission$
|
||||||
^TV$
|
^TV$
|
||||||
|
^TV.Series$
|
||||||
|
^TV.Show$
|
||||||
|
^TV.Shows$
|
||||||
^unsorted$
|
^unsorted$
|
||||||
^user$
|
^user$
|
||||||
^utorrent$
|
^utorrent$
|
||||||
|
Loading…
Reference in New Issue
Block a user