1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-08-13 17:03:45 -04:00

* update data

This commit is contained in:
Reinhard Pointner 2014-08-05 16:41:42 +00:00
parent def3605db8
commit 83e32123de
4 changed files with 21 additions and 8 deletions

View File

@ -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)')

View File

@ -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<String, String> 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);

View File

@ -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

View File

@ -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."
}
]