* make sure to ignore Short movies from internal index (to reduce messing with similarly named good movies)

This commit is contained in:
Reinhard Pointner 2014-10-15 22:16:11 +00:00
parent 4ec8fbcedc
commit b23ae572f5
1 changed files with 2 additions and 1 deletions

View File

@ -113,10 +113,11 @@ new File('omdb.txt').eachLine('Windows-1252'){
def name = line[2].replaceAll(/\s+/, ' ').trim()
def year = line[3].toInteger()
def runtime = line[5]
def genres = line[6]
def rating = tryQuietly{ line[12].toFloat() } ?: 0
def votes = tryQuietly{ line[13].replaceAll(/\D/, '').toInteger() } ?: 0
if ((year >= 1970 && (runtime =~ /(\d.h)|(\d{3}.min)/ || votes >= 200) && rating >= 1 && votes >= 50) || (year >= 1950 && votes >= 5000)) {
if (!(genres =~ /Short/) && ((year >= 1970 && (runtime =~ /(\d.h)|(\d{3}.min)/ || votes >= 500) && rating >= 1 && votes >= 50) || (year >= 1950 && votes >= 5000))) {
omdb << [imdbid.pad(7), name, year]
}
}