diff --git a/BuildData.groovy b/BuildData.groovy index 984eb034..31b481f2 100644 --- a/BuildData.groovy +++ b/BuildData.groovy @@ -195,8 +195,7 @@ tvdb_updates.each{ update -> def imdb_name = tryLogCatch{ if (imdbid =~ /tt(\d+)/) { - def dom = IMDb.parsePage(IMDb.getMoviePageLink(imdbid.match(/tt(\d+)/) as int).toURL()) - return XPathUtilities.selectString("//META[@property='og:title']/@content", dom) + return OMDb.getMovieDescriptor(imdbid.match(/tt(\d+)/) as int, Locale.ENGLISH).getName() } } def data = [update.time, update.id, imdbid, tvdb_name ?: '', imdb_name ?: '', rating ?: 0, votes ?: 0] @@ -227,7 +226,7 @@ def thetvdb_index = [] tvdb.values().each{ r -> def tvdb_id = r[1] def tvdb_name = r[3] - def imdb_name = r[4].replaceAll(/\([^\)]*\)$/, '').trim() + def imdb_name = r[4] def rating = r[5] def votes = r[6] @@ -264,6 +263,7 @@ addSeriesAlias('Naruto Shippuden', 'Naruto Shippuuden') addSeriesAlias('Resurrection', 'Resurrection (US)') addSeriesAlias('Revolution', 'Revolution (2012)') addSeriesAlias('Cosmos: A Spacetime Odyssey', 'Cosmos A Space Time Odyssey') +addSeriesAlias('The Bridge (2013)', 'The Bridge (US)') diff --git a/source/net/filebot/web/OMDbClient.java b/source/net/filebot/web/OMDbClient.java index 36c64f44..6b66040b 100644 --- a/source/net/filebot/web/OMDbClient.java +++ b/source/net/filebot/web/OMDbClient.java @@ -16,6 +16,7 @@ import java.util.List; import java.util.Locale; import java.util.Map; import java.util.Map.Entry; +import java.util.Scanner; import java.util.TreeMap; import java.util.concurrent.TimeUnit; import java.util.regex.Matcher; @@ -112,18 +113,22 @@ public class OMDbClient implements MovieIdentificationService { if (node instanceof Map) { for (Entry it : ((Map) node).entrySet()) { if (it.getKey() != null && it.getValue() != null) { - info.put(it.getKey().toString(), it.getValue().toString()); + info.put(it.getKey().toString().trim(), it.getValue().toString().trim()); } } } return info; } - public Movie getMovie(Map info) { + public Movie getMovie(Map info) { try { - String name = info.get("Title").toString(); - int year = Integer.parseInt(info.get("Year").toString()); - int imdbid = Integer.parseInt(info.get("imdbID").toString().replace("tt", "")); + String name = info.get("Title"); + int year = new Scanner(info.get("Year")).useDelimiter("\\D+").nextInt(); + int imdbid = Integer.parseInt(info.get("imdbID").replace("tt", "")); + + if (name.length() <= 0 || year <= 1900 || imdbid <= 0) + throw new IllegalArgumentException(); + return new Movie(name, year, imdbid, -1); } catch (Exception e) { throw new IllegalArgumentException("Illegal fields: " + info); diff --git a/website/data/query-blacklist.txt b/website/data/query-blacklist.txt index 79e919e1..349ed836 100644 --- a/website/data/query-blacklist.txt +++ b/website/data/query-blacklist.txt @@ -33,6 +33,7 @@ ^Best$ ^Big$ ^British.TV$ +^BTN$ ^Cartoon$ ^Cinema$ ^clean$ @@ -147,6 +148,7 @@ ^Seeds$ ^Serier$ ^Series$ +^SERIJE$ ^Sex$ ^share$ ^shared$ @@ -196,6 +198,7 @@ ^Volume.[0-9]$ ^Volumes$ ^watch$ +^WD$ ^www$ ^XXX+$ A.PROCESAR diff --git a/website/reviews.json b/website/reviews.json index e8c0ee89..56faa34a 100644 --- a/website/reviews.json +++ b/website/reviews.json @@ -113,5 +113,10 @@ "user": "Piers", "date": "2014-04-16", "text": "I would go with FileBot as a free and simple way to rename content - over 18,000 files and a 99.8% first time success rate." + }, + { + "user": "thejoecal", + "date": "2014-07-31", + "text": "Filebot is probably one of the top 5 computer programs I've ever used." } ] \ No newline at end of file