* include short TV Show names in TheTVDB index as well and change TheTVDB index tsv format to the new multi-alias format

@see http://www.filebot.net/forums/viewtopic.php?f=8&p=5905
This commit is contained in:
Reinhard Pointner 2013-09-16 04:18:11 +00:00
parent 2bdf60d19b
commit dd3f73e6ef
1 changed files with 2 additions and 2 deletions

View File

@ -138,13 +138,13 @@ tvdb.values().each{
}
thetvdb_index = thetvdb_index.findResults{ [it[0] as Integer, it[1].replaceAll(/\s+/, ' ').trim()] }.findAll{ !(it[1] =~ /(?i:duplicate)/ || it[1] =~ /\d{6,}/ || it[1].startsWith('*') || it[1].endsWith('*') || it[1].length() <= 3) }
thetvdb_index = thetvdb_index.findResults{ [it[0] as Integer, it[1].replaceAll(/\s+/, ' ').trim()] }.findAll{ !(it[1] =~ /(?i:duplicate)/ || it[1] =~ /\d{6,}/ || it[1].startsWith('*') || it[1].endsWith('*') || it[1].length() < 2) }
thetvdb_index = thetvdb_index.sort(new Comparator() {
int compare(a, b) { a[0] <=> b[0] }
})
// join and sort
def thetvdb_txt = thetvdb_index.findResults{ [it[0].pad(6), it[1].trim()].join('\t') }
def thetvdb_txt = thetvdb_index.groupBy{ it[0] }.findResults{ k, v -> ([k.pad(6)] + v*.getAt(1).unique()).join('\t') }
pack(thetvdb_out, thetvdb_txt)
println "TheTVDB Index: " + thetvdb_txt.size()