1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-12-24 08:48:51 -05:00

* handle illegal imdb ids properly

This commit is contained in:
Reinhard Pointner 2012-07-13 06:46:58 +00:00
parent 8fd4576ff4
commit 155a487e31

View File

@ -6,6 +6,7 @@ import static net.sourceforge.filebot.web.WebRequest.*;
import static net.sourceforge.tuned.XPathUtilities.*;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.Reader;
import java.net.URL;
@ -111,7 +112,11 @@ public class IMDbClient implements MovieIdentificationService {
@Override
public Movie getMovieDescriptor(int imdbid, Locale locale) throws Exception {
return scrapeMovie(parsePage(new URL("http", host, String.format("/title/tt%07d/releaseinfo", imdbid))));
try {
return scrapeMovie(parsePage(new URL("http", host, String.format("/title/tt%07d/releaseinfo", imdbid))));
} catch (FileNotFoundException e) {
return null; // illegal imdbid
}
}