From 241b3aeee0c0f1a69e114929666132cb8ca36bc2 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Mon, 16 Dec 2013 03:59:55 +0000 Subject: [PATCH] * update special cases --- BuildData.groovy | 7 +++++-- website/data/series-mappings.txt | 3 +-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/BuildData.groovy b/BuildData.groovy index e53790b0..dd28397e 100644 --- a/BuildData.groovy +++ b/BuildData.groovy @@ -193,19 +193,22 @@ tvdb.values().each{ def addSeriesAlias = { from, to -> def se = thetvdb_index.find{ from == it[1] } + if (se == null) throw new Exception("Unabled to find series '${from}'") thetvdb_index << [se[0], to] - // println "Added alias '${to}' for ${se}" } // additional custom mappings addSeriesAlias('Law & Order: Special Victims Unit', 'Law and Order SVU') addSeriesAlias('Law & Order: Special Victims Unit', 'Law & Order SVU') -addSeriesAlias('Battlestar Galactica (2003)', 'BSG') addSeriesAlias('CSI: Crime Scene Investigation', 'CSI') addSeriesAlias('M*A*S*H', 'MASH') addSeriesAlias('M*A*S*H', 'M.A.S.H.') addSeriesAlias('NCIS: Los Angeles', 'NCIS LA') +addSeriesAlias('How I Met Your Mother', 'HIMYM') +addSeriesAlias('Battlestar Galactica (2003)', 'BSG') addSeriesAlias('World Series of Poker', 'WSOP') +addSeriesAlias('English Premier League', 'EPL') +addSeriesAlias('House of Cards', 'HOC') 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) } diff --git a/website/data/series-mappings.txt b/website/data/series-mappings.txt index 1e2e199e..45a85b8e 100644 --- a/website/data/series-mappings.txt +++ b/website/data/series-mappings.txt @@ -1,7 +1,7 @@ BSG Battlestar Galactica CSI(?!.{0,3}(NY|LA|Miami|Academy)) CSI: Crime Scene Investigation epl English Premier League -HIMYM How I Met your Mother +HIMYM How I Met Your Mother Hml8p Homeland hoc House of Cards law.and.order.svu Law & Order: Special Victims Unit @@ -11,5 +11,4 @@ NCIS.LA NCIS: Los Angeles SuiG7p Suits tvs.got Game of Thrones UndG7p Underemployed -vampire The Vampire Diaries wsop World Series of Poker \ No newline at end of file