From b23ae572f5f19a2444c080b53b2e73a4ce86145f Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Wed, 15 Oct 2014 22:16:11 +0000 Subject: [PATCH] * make sure to ignore Short movies from internal index (to reduce messing with similarly named good movies) --- BuildData.groovy | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/BuildData.groovy b/BuildData.groovy index 96838173..05433285 100644 --- a/BuildData.groovy +++ b/BuildData.groovy @@ -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] } }