* restrict local osdb to useful entries

This commit is contained in:
Reinhard Pointner 2015-05-25 00:02:49 +00:00
parent ac7a72c477
commit f4651814e9
1 changed files with 2 additions and 2 deletions

View File

@ -333,7 +333,7 @@ new File('osdb.txt').eachLine('UTF-8'){
// 0 IDMovie, 1 IDMovieImdb, 2 MovieName, 3 MovieYear, 4 MovieKind, 5 MoviePriority
if (fields.size() == 6 && fields[1] ==~ /\d+/ && fields[3] ==~ /\d{4}/) {
if (fields[4] ==~ /movie|tv.series/ && isValidMovieName(fields[2]) && (fields[3] as int) >= 1970 && (fields[5] as int) >= 100) {
if (fields[4] ==~ /movie|tv.series/ && isValidMovieName(fields[2]) && (fields[3] as int) >= 1970 && (fields[5] as int) >= 750) {
// 0 imdbid, 1 name, 2 year, 3 kind, 4 priority
osdb << [fields[1] as int, fields[2], fields[3] as int, fields[4] == /movie/ ? 'm' : fields[4] == /tv series/ ? 's' : '?', fields[5] as int]
}
@ -359,5 +359,5 @@ osdb = osdb.findResults{
}
// sanity check
if (osdb.size() < 30000) { die('OSDB index sanity failed:' + osdb.size()) }
if (osdb.size() < 20000) { die('OSDB index sanity failed:' + osdb.size()) }
pack(osdb_out, osdb*.join('\t'))