* Fix corner-case that leads to mismatch if DB says a movie doesn't exist while at the same time there is an RG of the same name

@see http://www.filebot.net/forums/viewtopic.php?f=4&t=920
This commit is contained in:
Reinhard Pointner 2013-09-03 12:07:55 +00:00
parent 5ef33f236c
commit d1b80b825c
2 changed files with 4 additions and 1 deletions

View File

@ -201,7 +201,7 @@ public class ReleaseInfo {
public Pattern getReleaseGroupPattern(boolean strict) throws IOException {
// pattern matching any release group name enclosed in separators
return compile("(?<!\\p{Alnum})(" + join(releaseGroupResource.get(), "|") + ")(?!\\p{Alnum})", strict ? 0 : CASE_INSENSITIVE | UNICODE_CASE);
return compile("(?<!\\p{Alnum})(" + join(releaseGroupResource.get(), "|") + ")(?!\\p{Alnum}|[^\\p{Alnum}]\\d{4})", strict ? 0 : CASE_INSENSITIVE | UNICODE_CASE);
}
public Pattern getBlacklistPattern() throws IOException {

View File

@ -68,6 +68,9 @@ public class TMDbClient implements MovieIdentificationService {
List<Movie> result = new ArrayList<Movie>();
for (JSONObject it : jsonList(response.get("results"))) {
if (it == null)
continue;
// e.g.
// {"id":16320,"title":"冲出宁静号","release_date":"2005-09-30","original_title":"Serenity"}
String title = (String) it.get("title");