1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-08-13 17:03:45 -04:00

Refactor BuildData.groovy

This commit is contained in:
Reinhard Pointner 2016-11-22 19:04:45 +08:00
parent 3f10b3265b
commit 28954d4b83

View File

@ -289,16 +289,16 @@ tvdb.values().each{ r ->
return
}
if (year > 0) {
names.add(1, names[0].replaceTrailingBrackets() + " ($year)")
}
def alias = extraAliasNames[names[0]]
if (alias) {
log.fine "Add alias ${names[0]} => ${alias}"
names += alias
}
if (year > 0 && !names[0].endsWith(" ($year)")) {
names.add(1, names[0] + " ($year)")
}
// always include if alias has been manually added
if (alias != null || (votes >= 5 && rating >= 4) || (votes >= 2 && rating >= 6) || (votes >= 1 && rating >= 10)) {
getNamePermutations(names).each{ n ->