* fixed aka title handling for OpenSubtitles (they apparently changed the aka separator)

This commit is contained in:
Reinhard Pointner 2010-05-13 15:13:24 +00:00
parent 2fc8d92e03
commit 9664d86944
1 changed files with 2 additions and 2 deletions

View File

@ -135,8 +135,8 @@ public class OpenSubtitlesXmlRpc {
List<MovieDescriptor> movies = new ArrayList<MovieDescriptor>();
for (Map<String, String> movie : movieData) {
// get non-aka title (aka titles are separated by Â)
Scanner titleScanner = new Scanner(movie.get("title")).useDelimiter("\u00C2");
// get non-aka title (aka titles were separated by Â, and then aka later on)
Scanner titleScanner = new Scanner(movie.get("title")).useDelimiter("(\u00C2)|(\\s+aka\\s+)");
movies.add(new MovieDescriptor(titleScanner.next().trim(), Integer.parseInt(movie.get("id"))));
}